<?php
////////////////////////////////////////
//Code By Kerim YILMAZ
//www.ayazoglu.org
////////////////////////////////////////
@$cookie_file_path = "c.txt";
// c.txt die bi dosya yapın cookie ler kayıt için..
$fp = fopen($cookie_file_path, "w");
fclose($fp);
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7";
$reffer = "http://www.facebook.com/login.php";
$kullaniciadin = "faceboook email";
$sifren = "şifren";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://login.facebook.com/login.php");
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com/login.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&version=1.0&return_session=0&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&email=".$kullaniciadin."&pass=".$sifren."");
$html = curl_exec($ch);
$bol = explode('<head>', $html);
$oku = explode('Hesap', $bol[1]);
if($oku){
// Üyelik var işlemle
}else{
// Üyelik Yok işlemler
}
//Giriş yaptıktan sonra anasayfayı yazar
echo $bol[1;]
?>
this code very good ;)