Anyone have a working example of logging into a protected area and navigating to another page using php, curl & cookies, oh my
I can get logged in, but that's about it.
I can get logged in, but that's about it.
Pay Per Click 

curl_setopt($ch, CURLOPT_URL, 'http://my.com/login.php?');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'username=PPC&password=madcharacters');
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
stufffff
curl_setopt($ch, CURLOPT_URL, 'http://my.com/add.php');
$2ndpagecontent = curl_exec ($ch);
echo $2ndpagecontent;
Pay Per Click 

Comment