PHP script

Gestart doorBen22 reacties42 weergaven

23 berichten · pagina 2 van 2

Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik hoef niet echt persee een response, ik wil gewoon dat hij die javascript:turn(); draait op die pagina. Resultaat zie ik toch wel in mijn account.
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ben schreef:
Ik hoef niet echt persee een response, ik wil gewoon dat hij die javascript:turn(); draait op die pagina. Resultaat zie ik toch wel in mijn account.
Toon dan wat die functie doet. Ergens in de bron staat dit:

function turn() {
// rotzooi
}

Ik wil weten wat de rotzooi inhoud, dan kan ik de boel misschien trucken. En hij doet sowieso een request sturen als hij iets in je database aanpast.

toevoeging op 22 maart 2012, 17:29:57:
// sorry, niet gekeken. Ik zal dadelijk kijken wat ik voor je kan doen.

toevoeging op 22 maart 2012, 17:32:12:
Ik denk dat er in ander bestand ofzo nog iets van ajax.updater staat. Dat is ook nodig.
0
Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Vriendje schreef:
Eerdere citaten tonen
Ben schreef:
Ik hoef niet echt persee een response, ik wil gewoon dat hij die javascript:turn(); draait op die pagina. Resultaat zie ik toch wel in mijn account.
Toon dan wat die functie doet. Ergens in de bron staat dit:

function turn() {
// rotzooi
}

Ik wil weten wat de rotzooi inhoud, dan kan ik de boel misschien trucken. En hij doet sowieso een request sturen als hij iets in je database aanpast.

toevoeging op 22 maart 2012, 17:29:57:
// sorry, niet gekeken. Ik zal dadelijk kijken wat ik voor je kan doen.

toevoeging op 22 maart 2012, 17:32:12:
Ik denk dat er in ander bestand ofzo nog iets van ajax.updater staat. Dat is ook nodig.
In welk bestand dan? yummieedit; Ik PM even de link yummie
Ajax.Updater = Class.create(Ajax.Request, {
  initialize: function($super, container, url, options) {
    this.container = {
      success: (container.success || container),
      failure: (container.failure || (container.success ? null : container))
    };

    options = Object.clone(options);
    var onComplete = options.onComplete;
    options.onComplete = (function(response, json) {
      this.updateContent(response.responseText);
      if (Object.isFunction(onComplete)) onComplete(response, json);
    }).bind(this);

    $super(url, options);
  },

  updateContent: function(responseText) {
    var receiver = this.container[this.success() ? success : failure],
        options = this.options;

    if (!options.evalScripts) responseText = responseText.stripScripts();

    if (receiver = $(receiver)) {
      if (options.insertion) {
        if (Object.isString(options.insertion)) {
          var insertion = { }; insertion[options.insertion] = responseText;
          receiver.insert(insertion);
        }
        else options.insertion(receiver, responseText);
      }
      else receiver.update(responseText);
    }
  }
});
0
Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Vriendje schreef:
Ja dat is die link inderdaad smile
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dan zou je met cURL na het inloggen die pagina moeten bezoeken en een post waarde meegeven:
evalScripts=true
0
Ben

Lid · Topicstarter

Berichten
4.598
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En hoe doe ik dat dan? Ben niet echt een kei in PHP emo
toevoeging op 23 maart 2012, 171514:

<script>
//ajax request
    function ajaxRequest(){
        new Request({
            url: http://url.nl/wheel-of-fortune,
            method: post,
            data : javascript:turn();,
            evalScripts: true,
            onFailure: function(instance){
            }.bind(this),
            onSuccess: function(result){
                $(refresh-box).set(html,result);
            }.bind(this)
        }).send();
    }
</script>


Zoiets?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ben schreef:
En hoe doe ik dat dan? Ben niet echt een kei in PHP emo
toevoeging op 23 maart 2012, 171514:

<script>
//ajax request
    function ajaxRequest(){
        new Request({
            url: http://url.nl/wheel-of-fortune,
            method: post,
            data : javascript:turn();,
            evalScripts: true,
            onFailure: function(instance){
            }.bind(this),
            onSuccess: function(result){
                $(refresh-box).set(html,result);
            }.bind(this)
        }).send();
    }
</script>


Zoiets?

Dat is geen PHP confused
Je kan bij aanvragen iets posten

toevoeging op 23 maart 2012, 22:25:19:

[COLOR= #0000BB]<?php[/COLOR]
    [COLOR= #FF8000]//Config[/COLOR]
    [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]x[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]x[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #FF8000]// Einde config[/COLOR]
    
    [COLOR= #0000BB]$ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]();[/COLOR]

    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]x[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POST[COLOR= #007700],[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POSTFIELDS[COLOR= #007700],[/COLOR] [COLOR= #DD0000]username=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]&password=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_HEADER[COLOR= #007700],[/COLOR] FALSE[COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_COOKIEJAR[COLOR= #007700],[/COLOR] [COLOR= #DD0000]cookie.txt[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_RETURNTRANSFER[COLOR= #007700],[/COLOR] TRUE[COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_USERAGENT[COLOR= #007700],[/COLOR] [COLOR= #DD0000]Mozilla/4.0[/COLOR][COLOR= #007700]);[/COLOR]
    
    curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
    
    curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.site.nl/wheel-of-fortune[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POST[COLOR= #007700],[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POSTFIELDS[COLOR= #007700],[/COLOR] [COLOR= #DD0000]evalScripts=true[/COLOR][COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_HEADER[COLOR= #007700],[/COLOR] FALSE[COLOR= #007700]);[/COLOR]
    curl_setopt [COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_RETURNTRANSFER[COLOR= #007700],[/COLOR] TRUE[COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]===[/COLOR] FALSE[COLOR= #007700]) {[/COLOR]
        [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Curl error: [/COLOR] [COLOR= #007700].[/COLOR] curl_error[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);
    }[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$content[/COLOR]
    curl_close[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]

?>


Probeer ns?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren