Curl ile facebook durumunu güncelle.

PHP:
  1. <?PHP
  2.  
  3. $status = 'YAZILACAK MESAJINIZ';
  4. $first_name = 'İSİMİNİZ';
  5. $login_email = 'MAİL  ADRESİNİZ';
  6. $login_pass = 'FACEBOOK ŞİFRENİZ';
  7.  
  8. $ch = curl_init();
  9. curl_setopt($ch, CURLOPT_URL, 'https://login.facebook.com/login.php?m&amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php');
  10. curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&login=Login');
  11. curl_setopt($ch, CURLOPT_POST, 1);
  12. curl_setopt($ch, CURLOPT_HEADER, 0);
  13. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  14. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  15. curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie_kayit.txt");
  16. curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie_kayit.txt");
  17. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  18. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
  19. curl_exec($ch);
  20.  
  21. curl_setopt($ch, CURLOPT_POST, 0);
  22. curl_setopt($ch, CURLOPT_URL, 'http://m.facebook.com/home.php');
  23. $page = curl_exec($ch);
  24.  
  25. curl_setopt($ch, CURLOPT_POST, 1);
  26. preg_match('/name="post_form_id" value="(.*)" \/>'.ucfirst($first_name).'/', $page, $form_id);
  27. curl_setopt($ch, CURLOPT_POSTFIELDS,'post_form_id='.$form_id[1].'&status='.urlencode($status).'&update=Update');
  28. curl_setopt($ch, CURLOPT_URL, 'http://m.facebook.com/home.php');
  29. curl_exec($ch);
  30. ?>

One Comment

  1. Adil İLHAN diyor ki:

    Bu buna benzer kodlarda, ayrıca bir de form açıp form üzerinden yapılsa daha kolay olur.Yani kullanacak kişi forma veriyi yazacak facebook’ta da durumu güncellenecek…

Leave a Reply

*
Gereksiz Yorumlari Engellemek icin bu uygulamaya 3 sn katlanmak zorundasiniz .
Buraya Tiklayin

Click to hear an audio file of the anti-spam word