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

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

$dusername = 'KullaniciAdi';

$dpassword = 'Sifre';

$link = urlencode('$yaziLinki');

$desc = urlencode($yazi_baslik);

$ext = urlencode($yazi_aciklama);

$deltags = urlencode($yazi_etiket);

 

$api = "api.del.icio.us/v1";

 

$apicall = "https://$dusername:$dpassword@$api/posts/add?&url=$link&description=$desc&extended=$ext&tags=$deltags";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,$apicall);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);

curl_setopt($ch, CURLOPT_USERAGENT, 'php-curl');

curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

$xml = curl_exec ($ch);

$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);

if ($httpcode != 200) {

echo ...

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

PLAIN TEXT
PHP:

$twitter_api_url = "http://twitter.com/statuses/update.xml";

$twitter_data = "status=Buraya Link ve Açıklama Yazabilirsiniz";

$twitter_user = "KullaniciAdi";

$twitter_password = "Sifre";

$ch = curl_init($twitter_api_url);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $twitter_data);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_USERPWD, "{$twitter_user}:{$twitter_password}");

$twitter_data = curl_exec($ch);

$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);

if ($httpcode != 200) {

echo "Twitter HATA";

} else {

echo "Twitter OK&";

}

Yapmanız gereken cURL destekleyen bir sunucunuz var ...

Luvo designed by Internet Marketing In conjunction with Template Wordpress , R4 DS , Best SUV.