Author: square room
1. Define Cookie storage path / > you must use absolute path. Dirname (__FILE__)..quot; /pic.cookie.quot; [/code]
two, Cookie
Save cookie
$content = curl_exec ($ch). To the server, let the server think that the browser opens the landing page
[code]$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL,'http://1.2.3.4/getCheckpic.action? Rand=6836.185874812305');
curl_setopt. />curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec ($ch);
curl_close ($ch);
[/code]
[/code]
four. >$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL,.Quot; http://1.2.3.4/loginstudent.action.quot;);
curl_setopt.
$result=curl_exec ($ch);
curl_close ($ch);
[/code]
five, to the specified page to obtain data
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie_jar);