Sry for my stupid question,
but i don't understand how send my form post data with curl. I try to submit my form to a checkscript on minecraft-server.eu to make a vote-for-gold script.
The normal way i could pass the data to the target and the vote is accepted.
Now to my problem:
Could you guys please tell me: What do I have to do to send the data through cURL and how could i get the return to the test if the vote was accepted. My testscript told me that I send the same data as the original form but my votes are not accepted...
And don't think that this is illegal. Minecraft-Server.eu accepts votescripts. I was using a workaround with the original form in an iframe and the script was parsing my votes before and after the voting. But now i want to make a fully integrated solution...
my old solution: http://www.craftingen.de/vote.php (<!-- w --><a class="postlink" href="http://www.craftingen.de">www.craftingen.de</a><!-- w --> for main page)
my new solution: http://www.craftingen.com/ (go to the menu servervote to see my try...)
Thanks for help friends and
best regards
Daniel Heinen(AlShaddai)
but i don't understand how send my form post data with curl. I try to submit my form to a checkscript on minecraft-server.eu to make a vote-for-gold script.
The normal way i could pass the data to the target and the vote is accepted.
Now to my problem:
Could you guys please tell me: What do I have to do to send the data through cURL and how could i get the return to the test if the vote was accepted. My testscript told me that I send the same data as the original form but my votes are not accepted...
And don't think that this is illegal. Minecraft-Server.eu accepts votescripts. I was using a workaround with the original form in an iframe and the script was parsing my votes before and after the voting. But now i want to make a fully integrated solution...
my old solution: http://www.craftingen.de/vote.php (<!-- w --><a class="postlink" href="http://www.craftingen.de">www.craftingen.de</a><!-- w --> for main page)
my new solution: http://www.craftingen.com/ (go to the menu servervote to see my try...)
Thanks for help friends and
best regards
Daniel Heinen(AlShaddai)
Hi Daniel,
I don't see any servervote menu to test :-(
Please add a debugger action to your form On Submit event and post the debug output here together with your current cURL action settings.
Bob
I don't see any servervote menu to test :-(
Please add a debugger action to your form On Submit event and post the debug output here together with your current cURL action settings.
Bob
Thank you greyhead for qualified help,
I tried the debug action, and now i know that my script sends the correct information. But it's not finished...
The return of minecraft-server.eu tells me that the code is incorrect. It seems that i have to give the correct session id to their script. for better understanding i post my source here:
i get the captcha, build a form an when i send it through the normal form-action to their php-script it tells that vote is accepted. But when i send my form through cURL it tells me that the code is incorrect.
Now my module "Servervote" is open for anyone and you'll get the debug-Information. I think that it has something todo with the session, but i don't know how to work with that and how i could use the return for my site to work with that after.
Thanks for ya help and good night for now
Daniel Heinen
I tried the debug action, and now i know that my script sends the correct information. But it's not finished...
The return of minecraft-server.eu tells me that the code is incorrect. It seems that i have to give the correct session id to their script. for better understanding i post my source here:
<?php
$user = JFactory::getUser();
$recaptcha_url = 'http://minecraft-server.eu/index.php?go=servervote&id=6645';
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($curl, CURLOPT_URL, $recaptcha_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
$site = curl_exec($curl);
curl_close($curl);
preg_match('#src="klassen(.*)"#', $site, $rueckgabe);
$rueckgabe="http://minecraft-server.eu/klassen$rueckgabe[1]";
// Test ob der Benutzer eingeloggt ist
if (!$user->guest) {
echo 'Du bist eingeloggt als: ' . $user->get('username') . '<br /><br />';
}
echo '<center><img id="siimage" align="left" style="padding: 5px; border: 0" src="'.$rueckgabe.'"/></center>';?>
<input type="hidden" value=<?php echo $user->get('username')?> name="name" />
<input type="hidden" value="servervote" name="go" />
<input type="hidden" value="6645" name="id" />
<div class="ccms_form_element cfdiv_text" id="autoID-03d66e9243265c2227bfa2a0655e1419_container_div"><input maxlength="150" size="30" class="" title="" type="text" placeholder="Code hier eingeben" value="" name="code" />
<div class="clear"></div><div id="error-message-input_text_2"></div></div><div class="ccms_form_element cfdiv_submit" id="autoID-124c7981e76c67cd248d176d022e330d_container_div"><input name="input_submit_1" class="" value="Submit" type="submit" />
<div class="clear"></div><div id="error-message-input_submit_1"></div></div>
</BR>
</BR>i get the captcha, build a form an when i send it through the normal form-action to their php-script it tells that vote is accepted. But when i send my form through cURL it tells me that the code is incorrect.
Now my module "Servervote" is open for anyone and you'll get the debug-Information. I think that it has something todo with the session, but i don't know how to work with that and how i could use the return for my site to work with that after.
Thanks for ya help and good night for now
Daniel Heinen
This topic is locked and no more replies can be posted.
