<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Osman ERDOĞAN &#187; curl</title>
	<atom:link href="http://www.osmanerdogan.com/tag/curl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.osmanerdogan.com</link>
	<description>Kişisel Web Sitesi ve Web Günlüğü</description>
	<lastBuildDate>Mon, 02 Jan 2012 09:01:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP ile WordPress Bloga Yazı Eklemek (XMLRPC)</title>
		<link>http://www.osmanerdogan.com/2011/03/07/php-ile-wordpress-bloga-yazi-eklemek-xmlrpc/</link>
		<comments>http://www.osmanerdogan.com/2011/03/07/php-ile-wordpress-bloga-yazi-eklemek-xmlrpc/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 20:35:29 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[Kodlama]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML-RPC]]></category>
		<category><![CDATA[yazı]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=552</guid>
		<description><![CDATA[Çoğu zaman yazıyı elle eklemek zor oluyor heleki PHP ile sitelerinde hazır bot kullanan arkadaşlar için  
İlk öncelikle yönetim panelinden Settings kısmından Writing e tıklayarak sayfanın altında XML-RPC'yi etkin etmemiz gerekiyor harici bir dosyadan veri ekleyebilmemiz için.
PLAIN TEXT
PHP:




function wpPostXMLRPC&#40;$title,$body,$rpcurl,$username,$password,$category,$keywords=''&#41; &#123;


&#160; &#160; 


&#160; &#160; $content = array&#40;


&#160; &#160; &#160; &#160; 'title'=&#62;$title,


&#160; ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.osmanerdogan.com/wp-content/uploads/2011/03/php_logo1.jpg"><img src="http://www.osmanerdogan.com/wp-content/uploads/2011/03/php_logo1.jpg" alt="" title="PHP Logo" width="100" height="100" class="alignleft size-full wp-image-530" style="float:left; margin:5px;" /></a>Çoğu zaman yazıyı elle eklemek zor oluyor heleki <a href="/tag/php/">PHP</a> ile sitelerinde hazır bot kullanan arkadaşlar için <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>İlk öncelikle yönetim panelinden <strong>Settings </strong>kısmından <strong>Writing </strong>e tıklayarak sayfanın altında <strong>XML-RPC</strong>'yi etkin etmemiz gerekiyor harici bir dosyadan veri ekleyebilmemiz için.</p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> wpPostXMLRPC<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$title</span>,<span style="color:#0000FF;">$body</span>,<span style="color:#0000FF;">$rpcurl</span>,<span style="color:#0000FF;">$username</span>,<span style="color:#0000FF;">$password</span>,<span style="color:#0000FF;">$category</span>,<span style="color:#0000FF;">$keywords</span>=<span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$content</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'title'</span>=&gt;<span style="color:#0000FF;">$title</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'description'</span>=&gt;<span style="color:#0000FF;">$body</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'mt_allow_comments'</span>=&gt;<span style="color:#CC66CC;color:#800000;">1</span>,&nbsp; <span style="color:#FF9933; font-style:italic;">// Yoruma izin vermek için 1 yapın</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'mt_allow_pings'</span>=&gt;<span style="color:#CC66CC;color:#800000;">1</span>,&nbsp; <span style="color:#FF9933; font-style:italic;">// Trackbacks için 1 yapın</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'post_type'</span>=&gt;<span style="color:#FF0000;">'post'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'mt_keywords'</span>=&gt;<span style="color:#0000FF;">$keywords</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">'categories'</span>=&gt;array<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$category</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$params</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">0</span>,<span style="color:#0000FF;">$username</span>,<span style="color:#0000FF;">$password</span>,<span style="color:#0000FF;">$content</span>,<span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$request</span> = xmlrpc_encode_request<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'metaWeblog.newPost'</span>,<span style="color:#0000FF;">$params</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$ch</span> = curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_POSTFIELDS, <span style="color:#0000FF;">$request</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_URL, <span style="color:#0000FF;">$rpcurl</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_RETURNTRANSFER, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_TIMEOUT, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$results</span> = curl_exec<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_close<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$results</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Bu fonksiyon daha hızlı kullanmanız için <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$Baslik</span> = <span style="color:#FF0000;">'BAŞLIK'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$Icerik</span> = <span style="color:#FF0000;">'YAZI İÇİ'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$XMLPCDosyasi</span> = <span style="color:#FF0000;">'http://www.wpsiteminadresi.com/xmlrpc.php'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$KullaniciAdi</span> = <span style="color:#FF0000;">'admin'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$Sifre</span> = <span style="color:#FF0000;">'kullanicisifrem'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$Kategoriler</span> = <span style="color:#FF0000;">'Haber,Oyun,Spor'</span>; <span style="color:#FF9933; font-style:italic;">// Virgüllerle ayırarak kategori isimlerini yazmanız gerekmektedir.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$Etiketler</span> = <span style="color:#FF0000;">'xxx,yyy,zzz,aaa,eee,ppp,sss'</span>; <span style="color:#FF9933; font-style:italic;">// Virgüllerle ayırarak istediğiniz kadar yazabilirsiniz.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> wpPostXMLRPC<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$Baslik</span>,<span style="color:#0000FF;">$Icerik</span>,<span style="color:#0000FF;">$XMLPCDosyasi</span>,<span style="color:#0000FF;">$KullaniciAdi</span>,<span style="color:#0000FF;">$Sifre</span>,<span style="color:#0000FF;">$Kategoriler</span>,<span style="color:#0000FF;">$Etiketler</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Hayırlı uğurlu olsun <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Unutmadan <a href="http://www.r10.net/php/17372-curl-nedir.html" target="_blank">cURL</a> sunucuda aktif olması gerekmektedir. </p>
<p>Sizin için hazırlamış olduğum <a href="http://hotfile.com/dl/109187027/f3ca27c/php-wp-xmlrpc.php.html" target="_blank"><strong>dosya</strong></a>yı indirerek direkt olarak deneyebilirsiniz.</p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=552">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2011/03/07/php-ile-wordpress-bloga-yazi-eklemek-xmlrpc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>cURL &amp; php ile FriendFeed&#8217;e kayıt girişi yapmak</title>
		<link>http://www.osmanerdogan.com/2009/09/11/curl-php-ile-friendfeed-e-kayit-girisi-yapmak/</link>
		<comments>http://www.osmanerdogan.com/2009/09/11/curl-php-ile-friendfeed-e-kayit-girisi-yapmak/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 12:12:19 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[Kodlama]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[ff]]></category>
		<category><![CDATA[friendfeed]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=468</guid>
		<description><![CDATA[ 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;
PLAIN ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://friendfeed.com/"><img class="alignleft size-full wp-image-469" style="margin: 5px;float:left" title="fflogo" src="http://www.osmanerdogan.com/wp-content/uploads/2009/09/fflogo.png" alt="fflogo" width="256" height="55" /></a> friendfeed.com u bilmeyenimiz kalmadı sanırım tekrar açıklamaya gerek yoktur.</p>
<p>Daha önceden <a href="http://www.osmanerdogan.com/curl-php-ile-delicious%E2%80%99a-otomatik-yazi-gonderme/">delicious</a> ve <a href="http://www.osmanerdogan.com/curl-php-ile-twittera-otomatik-yazi-gonderme/">twitter</a> a curl ile yazı gönderimini işlemiştik.</p>
<p>Şimdide sıra friendfeed'e geldi.</p>
<p>İnternette aradım pek bişi bulamadım deneyerek ortaya çıktı kodlar <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="/friendfeed">Friendfeed</a> de daha öncekilerde olduğu gibi direk şifreniz ile işlem yapamıyorsunuz.</p>
<p><a href="https://friendfeed.com/account/api">https://friendfeed.com/account/api</a> adresinden Remote Key almanız gerekmektedir.</p>
<p>Ve işte kodlar;</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ff_api_url</span> = <span style="color:#FF0000;">"http://friendfeed-api.com/v2/entry"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ff_data</span> = <span style="color:#FF0000;">"body="</span>.<span style="color:#0000FF;">$Baslik</span>.<span style="color:#FF0000;">"&amp;link="</span>.<span style="color:#0000FF;">$Linkiniz</span>.<span style="color:#FF0000;">"&amp;comment="</span>.<span style="color:#0000FF;">$Yorumu_Aciklama</span>.<span style="color:#FF0000;">"&amp;image_url="</span>.<span style="color:#0000FF;">$ResimVarsaAdresi</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ff_user</span> = <span style="color:#FF0000;">"KullaniciAdiniz"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ff_password</span> = <span style="color:#FF0000;">"AlmisOldugunuzRemoteKey"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ch</span> = curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ff_api_url</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_POST, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_POSTFIELDS, <span style="color:#0000FF;">$ff_data</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_FOLLOWLOCATION, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_HEADER, <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_RETURNTRANSFER, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_USERPWD, <span style="color:#FF0000;">"{$ff_user}:{$ff_password}"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_data</span> = curl_exec<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$httpcode</span> = curl_getinfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLINFO_HTTP_CODE<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_close<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$httpcode</span> != <span style="color:#CC66CC;color:#800000;">200</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;strong&gt;Friendfeed&lt;/strong&gt; HATA&lt;br /&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;strong&gt;Friendfeed&lt;/strong&gt; OK&lt;br /&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>güle güle kullanımlar <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=468">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2009/09/11/curl-php-ile-friendfeed-e-kayit-girisi-yapmak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cURL &amp; php ile delicious’a otomatik yazı gönderme</title>
		<link>http://www.osmanerdogan.com/2009/06/22/curl-php-ile-delicious%e2%80%99a-otomatik-yazi-gonderme/</link>
		<comments>http://www.osmanerdogan.com/2009/06/22/curl-php-ile-delicious%e2%80%99a-otomatik-yazi-gonderme/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 09:03:03 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[Kodlama]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[curl delicious]]></category>
		<category><![CDATA[curl php]]></category>
		<category><![CDATA[curl to submit]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post delicious]]></category>
		<category><![CDATA[submit post to delicious]]></category>
		<category><![CDATA[submitdelicious]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=451</guid>
		<description><![CDATA[
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&#40;'$yaziLinki'&#41;;


$desc = urlencode&#40;$yazi_baslik&#41;;


$ext = urlencode&#40;$yazi_aciklama&#41;;


$deltags = urlencode&#40;$yazi_etiket&#41;;


&#160;


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


&#160;


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


$ch = curl_init&#40;&#41;;


curl_setopt&#40;$ch, CURLOPT_URL,$apicall&#41;;


curl_setopt&#40;$ch, CURLOPT_SSL_VERIFYHOST, 2&#41;;


curl_setopt&#40;$ch, CURLOPT_USERAGENT, 'php-curl'&#41;;


curl_setopt&#40;$ch, CURLOPT_RETURNTRANSFER,1&#41;;


$xml = curl_exec &#40;$ch&#41;;


$httpcode = curl_getinfo&#40;$ch, CURLINFO_HTTP_CODE&#41;;


curl_close&#40;$ch&#41;;


if &#40;$httpcode != 200&#41; &#123;


echo ...]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-452 alignnone" style="margin: 5px;" title="delicious_logo" src="http://www.osmanerdogan.com/wp-content/uploads/2009/06/delicious_logo.jpg" alt="delicious_logo" width="241" height="71" /></p>
<p>Daha önce <a href="/tag/curl">curl</a> ile <a href="/tag/twitter">twitter</a>'a post atma işlemini <a href="http://www.osmanerdogan.com/curl-php-ile-twittera-otomatik-yazi-gonderme/">incelemiştik</a> şimdide sıra geldi <a href="/tag/delicious">delicious</a>'a <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dusername</span> = <span style="color:#FF0000;">'KullaniciAdi'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$dpassword</span> = <span style="color:#FF0000;">'Sifre'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$link</span> = <a href="http://www.php.net/urlencode"><span style="color:#000066;">urlencode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'$yaziLinki'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$desc</span> = <a href="http://www.php.net/urlencode"><span style="color:#000066;">urlencode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$yazi_baslik</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ext</span> = <a href="http://www.php.net/urlencode"><span style="color:#000066;">urlencode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$yazi_aciklama</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$deltags</span> = <a href="http://www.php.net/urlencode"><span style="color:#000066;">urlencode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$yazi_etiket</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$api</span> = <span style="color:#FF0000;">"api.del.icio.us/v1"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$apicall</span> = <span style="color:#FF0000;">"https://$dusername:$dpassword@$api/posts/add?&amp;amp;url=$link&amp;amp;description=$desc&amp;amp;extended=$ext&amp;amp;tags=$deltags"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ch</span> = curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_URL,<span style="color:#0000FF;">$apicall</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_SSL_VERIFYHOST, <span style="color:#CC66CC;color:#800000;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_USERAGENT, <span style="color:#FF0000;">'php-curl'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_RETURNTRANSFER,<span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$xml</span> = curl_exec <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$httpcode</span> = curl_getinfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLINFO_HTTP_CODE<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_close<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$httpcode</span> != <span style="color:#CC66CC;color:#800000;">200</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;strong&gt;Delicious&lt;/strong&gt; HATA"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;strong&gt;Delicious&lt;/strong&gt; OK"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=451">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2009/06/22/curl-php-ile-delicious%e2%80%99a-otomatik-yazi-gonderme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>cURL &amp; php ile twitter&#8217;a otomatik yazı gönderme</title>
		<link>http://www.osmanerdogan.com/2009/05/26/curl-php-ile-twittera-otomatik-yazi-gonderme/</link>
		<comments>http://www.osmanerdogan.com/2009/05/26/curl-php-ile-twittera-otomatik-yazi-gonderme/#comments</comments>
		<pubDate>Tue, 26 May 2009 13:13:51 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[Kodlama]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[curl php]]></category>
		<category><![CDATA[curl to submit]]></category>
		<category><![CDATA[curl twitter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[post twitter]]></category>
		<category><![CDATA[submit post to twitter]]></category>
		<category><![CDATA[submittwitter]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=410</guid>
		<description><![CDATA[
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&#40;$twitter_api_url&#41;;


curl_setopt&#40;$ch, CURLOPT_POST, 1&#41;;


curl_setopt&#40;$ch, CURLOPT_POSTFIELDS, $twitter_data&#41;;


curl_setopt&#40;$ch, CURLOPT_FOLLOWLOCATION, 1&#41;;


curl_setopt&#40;$ch, CURLOPT_HEADER, 0&#41;;


curl_setopt&#40;$ch, CURLOPT_RETURNTRANSFER, 1&#41;;


curl_setopt&#40;$ch, CURLOPT_USERPWD, "{$twitter_user}:{$twitter_password}"&#41;;


$twitter_data = curl_exec&#40;$ch&#41;;


$httpcode = curl_getinfo&#40;$ch, CURLINFO_HTTP_CODE&#41;;


curl_close&#40;$ch&#41;;


if &#40;$httpcode != 200&#41; &#123;


echo "Twitter HATA";


&#125; else &#123;


echo "Twitter OK&#38;";


&#125; 






Yapmanız gereken cURL destekleyen bir sunucunuz var ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.osmanerdogan.com/wp-content/uploads/2009/05/twitter_logo_header1.png" alt="twitter" /></p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_api_url</span> = <span style="color:#FF0000;">"http://twitter.com/statuses/update.xml"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_data</span> = <span style="color:#FF0000;">"status=Buraya Link ve Açıklama Yazabilirsiniz"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_user</span> = <span style="color:#FF0000;">"KullaniciAdi"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_password</span> = <span style="color:#FF0000;">"Sifre"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ch</span> = curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$twitter_api_url</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_POST, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_POSTFIELDS, <span style="color:#0000FF;">$twitter_data</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_FOLLOWLOCATION, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_HEADER, <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_RETURNTRANSFER, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_USERPWD, <span style="color:#FF0000;">"{$twitter_user}:{$twitter_password}"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$twitter_data</span> = curl_exec<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$httpcode</span> = curl_getinfo<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLINFO_HTTP_CODE<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">curl_close<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$httpcode</span> != <span style="color:#CC66CC;color:#800000;">200</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Twitter HATA"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Twitter OK&amp;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Yapmanız gereken cURL destekleyen bir sunucunuz var ise istediğiniz makale veya yazılarınızı otomatik olarak <a href="/tag/twitter">twitter</a> hesabınıza post etmenize yardımcı olur.</p>
<p>Kolay Gelsin</p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=410">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2009/05/26/curl-php-ile-twittera-otomatik-yazi-gonderme/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

