Posts tagged ‘delicious’
cURL & php ile FriendFeed’e kayıt girişi yapmak
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:
-
$ff_api_url = "http://friendfeed-api.com/v2/entry";
-
$ff_data = "body=".$Baslik."&link=".$Linkiniz."&comment=".$Yorumu_Aciklama."&image_url=".$ResimVarsaAdresi;
-
$ff_user = "KullaniciAdiniz";
-
$ff_password = "AlmisOldugunuzRemoteKey";
-
$ch = curl_init($ff_api_url);
-
curl_setopt($ch, CURLOPT_POST, 1);
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $ff_data);
-
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
-
curl_setopt($ch, CURLOPT_HEADER, 0);
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-
curl_setopt($ch, CURLOPT_USERPWD, "{$ff_user}:{$ff_password}");
-
$twitter_data = curl_exec($ch);
-
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
-
curl_close($ch);
-
if ($httpcode != 200) {
-
echo "<strong>Friendfeed</strong> HATA<br />";
-
} else {
-
echo "<strong>Friendfeed</strong> OK<br />";
-
}
güle güle kullanımlar
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
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";
-
}