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.
PHP script
Ben schreef:Toon dan wat die functie doet. Ergens in de bron staat dit: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.
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.
Vriendje schreef:In welk bestand dan?Toon dan wat die functie doet. Ergens in de bron staat dit: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.
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.
edit; Ik PM even de link 
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);
}
}
}); Vriendje schreef:Ja dat is die link inderdaad

Dan zou je met cURL na het inloggen die pagina moeten bezoeken en een post waarde meegeven:
evalScripts=true
evalScripts=true
En hoe doe ik dat dan? Ben niet echt een kei in PHP 
toevoeging op 23 maart 2012, 17
14:
Zoiets?

toevoeging op 23 maart 2012, 17
14:<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?
Ben schreef:toevoeging op 23 maart 2012, 17En hoe doe ik dat dan? Ben niet echt een kei in PHP
14:<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

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?