I'm using curl for signing in. With some sites it works. For example, here's the code:
$username = "*******"; $password = "********"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "site url" ); curl_setopt($ch, CURLOPT_POST, 1 ); curl_setopt($ch, CURLOPT_POSTFIELDS, 'username='.$username.'&password='.$password.'&act=login'); curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); $store = curl_exec ($ch); curl_setopt($ch, CURLOPT_URL, "site url" ); curl_setopt($ch, CURLOPT_POST, 1 ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $str = curl_exec($ch); print $str; curl_close ($ch);
But the problem comes up with sites where the "form" redirects (OnClick) to a javascript. For instance:
input type="image" src="enter.jpg" border="0" onClick="Some script"
So, here's the question: can I start the javascript with curl? And if not then how can I "sign in" in order to gather wanted information?
Edited by Jordan, 20 July 2008 - 04:53 AM.
Added code tags


Sign In
Create Account

Back to top









