$username = '';
$password = '';
$url = '';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);
$data = array("user"=>$username,"pass"=>$password,"submit"=>"Login");
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
echo curl_exec($ch);
my login credentials work fine, but instead curl following the login to the next page and displaying that, my browser tries to redirect to the page and i get an error...
help!