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

Kategori: Kodlama
HayırEvet (No Ratings Yet)
Loading ... Loading ...
3 Yorum

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?&url=$link&description=$desc&extended=$ext&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. }

Yazar: Osman ERDOĞAN   @   22 June 2009 3 comments
Etiketler : , , , , , , , , , Yazıyı Yazdır Yazıyı Yazdır

Yazıyı Paylaşmak İstemez misin?

RSS Digg Twitter StumbleUpon Delicious Technorati

3 Yorum

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Comments
Nov 14, 2009
16:11
#1 mincu :

ben bu api sistemimini aradım ama bir türlü bulamadım teşekkürler

Nov 15, 2009
20:57

php ve Curl kütüphanesi ile ilgli hazirladigim video eğitim cd si var. ilgilenen arkadaşlar olursa http://www.programlamatv.com/ders/php/curl-kutuphanesi-egitim-cd-si/ de detayi mevcut

Nov 21, 2009
18:42
#3 mincu :

bana bir örnek kontor apisi yazıp mincu12@gmail.com adresine gönderebilirminisiz??? Lütfenn çok ihtiyacım varr

Leave a Comment

Name

Email

Website

Önceki Yazı
« iframe virüsü yeniden başa bela
Sonraki Yazı
Personas, Firefox’a Arayüz »
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
CrossBlock designed by DeltaManual.Com  |  In conjunction with Web Hosting   |   Web Hosting   |   Reverse phone