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

 Kodlama       

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 ;)

cURL & php ile delicious’a otomatik yazı gönderme

 Kodlama       

delicious_logo

Daha önce curl ile twitter'a post atma işlemini incelemiştik şimdide sıra geldi delicious'a :)

PHP:
  1. $dusername = 'KullaniciAdi';
  2. $dpassword = 'Sifre';
  3. $link = urlencode('$yaziLinki');
  4. $desc = urlencode($yazi_baslik);
  5. $ext = urlencode($yazi_aciklama);
  6. $deltags = urlencode($yazi_etiket);
  7.  
  8. $api = "api.del.icio.us/v1";
  9.  
  10. $apicall = "https://$dusername:$dpassword@$api/posts/add?&amp;url=$link&amp;description=$desc&amp;extended=$ext&amp;tags=$deltags";
  11. $ch = curl_init();
  12. curl_setopt($ch, CURLOPT_URL,$apicall);
  13. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
  14. curl_setopt($ch, CURLOPT_USERAGENT, 'php-curl');
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  16. $xml = curl_exec ($ch);
  17. $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  18. curl_close($ch);
  19. if ($httpcode != 200) {
  20. echo "<strong>Delicious</strong> HATA";
  21. } else {
  22. echo "<strong>Delicious</strong> OK";
  23. }

cURL & php ile twitter’a otomatik yazı gönderme

 Kodlama       

twitter

PHP:
  1. $twitter_api_url = "http://twitter.com/statuses/update.xml";
  2. $twitter_data = "status=Buraya Link ve Açıklama Yazabilirsiniz";
  3. $twitter_user = "KullaniciAdi";
  4. $twitter_password = "Sifre";
  5. $ch = curl_init($twitter_api_url);
  6. curl_setopt($ch, CURLOPT_POST, 1);
  7. curl_setopt($ch, CURLOPT_POSTFIELDS, $twitter_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, "{$twitter_user}:{$twitter_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 "Twitter HATA";
  17. } else {
  18. echo "Twitter OK&";
  19. }

Yapmanız gereken cURL destekleyen bir sunucunuz var ise istediğiniz makale veya yazılarınızı otomatik olarak twitter hesabınıza post etmenize yardımcı olur.

Kolay Gelsin

Sayfa 1 - 11
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
CrossBlock designed by DeltaManual.Com  |  In conjunction with Web Hosting   |   Web Hosting   |   Reverse phone