0

Hello,

I'm trying to get a website source with a curl call but some data is missing and I don't know what I'm doing wrong.
If i make a call to the url in browser in the page source will apear "<!-- request captchas: blabla -->"..
but after I call in php it will bring in the page source: "<!-- request captchas: null -->"
Some help is more than welcome.My code:

$url='http://www.anaf.ro/anaf/internet/ANAF/informatii_publice/informatii_agenti_economici/registrul_inactivi_reactivati/';

curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0");
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_COOKIE, "JSESSIONID=0001R8jflCwCXeYrmbF45vBxtS-:3KMDRVUOUV");
curl_setopt($ch, CURLOPT_URL, $url);

$html = curl_exec($ch);
curl_close ($ch);
echo $html;
2
Contributors
1
Reply
14
Views
3 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.