Page 1 of 1

Curl problem blank page displaying

Posted: Mon May 18, 2009 11:01 pm
by edpudol
Hello to everyone, this is my first post and I am sorry because my first post is about problem...

I am developing a code where I am displaying some good tips in internet marketing at my site side bar...

I am using curl to open and parse some part of the page I like... the curl function work fine until find a facebook page that I want to parse. The problem is that it display blank page...

here is my code
I have using curl for one my application but I found this problem, that sometimes it does not get anything from the target page.... It display blank...

here is my code...

Code: Select all

 
$urls =  "http://www.facebook.com/pages/Seo-Tips-by-Peter-Drew-BruteForceSEO/86945032176";
$ch = curl_init($urls);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
$page = curl_exec($ch);
curl_close($ch);
 
The code above works fine at other site but don't work at facebook...

Thanks in advance

Re: Curl problem blank page displaying

Posted: Mon May 18, 2009 11:08 pm
by Benjamin
Try setting the CURLOPT_USERAGENT

Re: Curl problem blank page displaying

Posted: Mon May 18, 2009 11:48 pm
by edpudol
astions wrote:Try setting the CURLOPT_USERAGENT
You're an angel.... thank you very much it's been more than 24 hours I am looking for a solution and now it's working...

:drunk: