Take a screenshot with curl

zozor

Junior Member
Joined
Dec 24, 2008
Messages
113
Reaction score
72
Hi,
Im creating a curl script which first login to a website and then submit a complicated form. Its is very hard to debug as I cannot see what was the error when It don't work.
Is there a way to print or take a screenshot of the result of my curl script so I can see the errors ?
Hope I was clear
Thanks,
David
 
or can't you see whats wrong in return data.
May be you should first use firefox's tamper addon to know what exactly things are being passed to that form before trying curl and then put same fields on curl.
 
you can print_r() the results of curl_exec. Also a plugin for Firefox could help. Firebug addon for Firefox is a pretty amazing tool. I recommend it to all programmers.

If you are still having trouble, I wouldn't mind taking a look at the script. Just send me a PM
 
use this, of course adjust the $html to your needs

Code:
$html= curl_exec($ch);
if (!$html) {
 echo "<br />cURL error number:" .curl_errno($ch);
 echo "<br />cURL error:" . curl_error($ch);
 exit;
}
 
Back
Top