Hi folks,
This is the first time I'm using phpfreaks.Hope I'll get a quick solution.
I'm trying fetch HTML of page which is publicly accessible.
here is the code I used
$home="http://actas.rfef.es...ctas/NPortada";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$home);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_HEADER, TRUE);
curl_setopt($ch,CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:18.0)Gecko/20100101 Firefox/18.0");
curl_setopt($ch,CURLOPT_FOLLOWLOCATION, FALSE);
curl_setopt($ch,CURLOPT_COOKIEJAR, "cookies.txt");
echo curl_exec($ch);
curl_close($ch);
I'm being redirected to url http://actas.rfef.es...s/NLogin..which is just 0 byte blank page.what I'm doing wrong?
Please provide me suggestions,ideas,and correct code to grab the html of that page.
Thanks in advance