Using cURL authorization and directing to another page

     

I'm curently working on a project that requires me to remotely login to an intranet company's webpage and fetch some data from it.   Right now i'm having a problem when trying to login using cURL and i don't know what to do next.


Here is my code:


$ch=curl_init();   $agent= $_SERVER['HTTP_USER_AGENT'];   curl_setopt($ch CURLOPT_USERAGENT $agent);   curl_setopt($ch