Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X
Kenar

cURL & php ile FriendFeed’e kayıt girişi yapmak

fflogo friendfeed.com u bilmeyenimiz kalmadı sanırım tekrar açıklamaya gerek yoktur.

Daha önceden delicious ve twitter a curl ile yazı gönderimini işlemiştik.

Şimdide sıra friendfeed'e geldi.

İnternette aradım pek bişi bulamadım deneyerek ortaya çıktı kodlar :)

Friendfeed de daha öncekilerde olduğu gibi direk şifreniz ile işlem yapamıyorsunuz.

https://friendfeed.com/account/api adresinden Remote Key almanız gerekmektedir.

Ve işte kodlar;

PHP:
  1. $ff_api_url = "http://friendfeed-api.com/v2/entry";
  2. $ff_data = "body=".$Baslik."&link=".$Linkiniz."&comment=".$Yorumu_Aciklama."&image_url=".$ResimVarsaAdresi;
  3. $ff_user = "KullaniciAdiniz";
  4. $ff_password = "AlmisOldugunuzRemoteKey";
  5. $ch = curl_init($ff_api_url);
  6. curl_setopt($ch, CURLOPT_POST, 1);
  7. curl_setopt($ch, CURLOPT_POSTFIELDS, $ff_data);
  8. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  9. curl_setopt($ch, CURLOPT_HEADER, 0);
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  11. curl_setopt($ch, CURLOPT_USERPWD, "{$ff_user}:{$ff_password}");
  12. $twitter_data = curl_exec($ch);
  13. $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  14. curl_close($ch);
  15. if ($httpcode != 200) {
  16.     echo "<strong>Friendfeed</strong> HATA<br />";
  17.     } else {
  18.     echo "<strong>Friendfeed</strong> OK<br />";
  19.     }

güle güle kullanımlar ;)

Follow us on Twitter

Leave a comment  

name*

email*

website

Submit comment