TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Facebook search with cURL , where is the problem ? (http://www.talkphp.com/general/5588-facebook-search-curl-where-problem.html)

CΛSTΞX 09-29-2010 02:08 PM

Facebook search with cURL , where is the problem ?
 
This script logins the facebook and gather some data (not important) from search, but however, its not working. Where is my mistake ? (Login is working, but gathering info from search results, isnt.)

PHP Code:

<?

$first_name 
'Eda';
$login_email 'bodrumlukardes@hotmail.com';
$login_pass 'mypassword';

$ch curl_init();
curl_setopt($chCURLOPT_URL'https://login.facebook.com/login.php?m&amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php');
curl_setopt($chCURLOPT_POSTFIELDS,'email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&login=Login');
curl_setopt($chCURLOPT_POST1);
curl_setopt($chCURLOPT_HEADER0);
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($chCURLOPT_COOKIEJAR"my_cookies.txt");
curl_setopt($chCURLOPT_COOKIEFILE"my_cookies.txt");
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
curl_exec($ch);

curl_setopt($chCURLOPT_POST0);
curl_setopt($chCURLOPT_URL'http://www.facebook.com/search/?init=quick&q=bodrumlukardes%40hotmail.com');
$page curl_exec($ch);

curl_setopt($chCURLOPT_POST1);

preg_match_all('#<td(.*?)</td>#si'$page$aldim8);
echo 
$aldim8[1][0];


?>


Village Idiot 09-29-2010 03:52 PM

Is it returning anything at all?

CΛSTΞX 09-29-2010 05:34 PM

No it isn't. I ask if anyone see any mistake...


All times are GMT. The time now is 12:29 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0