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


(No Ratings Yet)

Loading ...
3 Yorum

Daha önce curl ile twitter'a post atma işlemini incelemiştik şimdide sıra geldi delicious'a
PHP:
-
$dusername = 'KullaniciAdi';
-
$dpassword = 'Sifre';
-
-
-
-
-
-
$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 "<strong>Delicious</strong> HATA";
-
} else {
-
echo "<strong>Delicious</strong> OK";
-
}
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.
16:11
ben bu api sistemimini aradım ama bir türlü bulamadım teşekkürler