<?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>Byumut &#187; kod</title>
	<atom:link href="http://www.byumut.com/tag/kod/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.byumut.com</link>
	<description>&#34; En büyük risk, risk almamaktır.... &#34;</description>
	<lastBuildDate>Tue, 27 Sep 2011 18:40:46 +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>Curl ile facebook durumunu güncelle.</title>
		<link>http://www.byumut.com/curl-ile-facebook-durumunu-guncelle/</link>
		<comments>http://www.byumut.com/curl-ile-facebook-durumunu-guncelle/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 00:53:18 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[curl örnekleri]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook durum güncelle]]></category>
		<category><![CDATA[facebook status]]></category>
		<category><![CDATA[kod]]></category>
		<category><![CDATA[örnek]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://www.byumut.com/?p=531</guid>
		<description><![CDATA[PLAIN TEXT PHP: &#60;?PHP &#160; $status = 'YAZILACAK MESAJINIZ'; $first_name = 'İSİMİNİZ'; $login_email = 'MAİL&#160; ADRESİNİZ'; $login_pass = 'FACEBOOK ŞİFRENİZ'; &#160; $ch = curl_init&#40;&#41;; curl_setopt&#40;$ch, CURLOPT_URL, 'https://login.facebook.com/login.php?m&#38;amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php'&#41;; curl_setopt&#40;$ch, CURLOPT_POSTFIELDS,'email='.urlencode&#40;$login_email&#41;.'&#38;pass='.urlencode&#40;$login_pass&#41;.'&#38;login=Login'&#41;; curl_setopt&#40;$ch, CURLOPT_POST, 1&#41;; curl_setopt&#40;$ch, CURLOPT_HEADER, 0&#41;; curl_setopt&#40;$ch, CURLOPT_FOLLOWLOCATION, 1&#41;; curl_setopt&#40;$ch, CURLOPT_SSL_VERIFYPEER, false&#41;; curl_setopt&#40;$ch, CURLOPT_COOKIEJAR, "cookie_kayit.txt"&#41;; curl_setopt&#40;$ch, CURLOPT_COOKIEFILE, "cookie_kayit.txt"&#41;; curl_setopt&#40;$ch, CURLOPT_RETURNTRANSFER, 1&#41;; curl_setopt&#40;$ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; [...]]]></description>
			<content:encoded><![CDATA[<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<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;">&lt;?PHP</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;"><span style="color:#0000FF;">$status</span> = <span style="color:#FF0000;">'YAZILACAK MESAJINIZ'</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;">$first_name</span> = <span style="color:#FF0000;">'İSİMİNİZ'</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;">$login_email</span> = <span style="color:#FF0000;">'MAİL&nbsp; ADRESİNİZ'</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;">$login_pass</span> = <span style="color:#FF0000;">'FACEBOOK ŞİFRENİZ'</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;">$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;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_URL, <span style="color:#FF0000;">'https://login.facebook.com/login.php?m&amp;amp;next=http%3A%2F%2Fm.facebook.com%2Fhome.php'</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_POSTFIELDS,<span style="color:#FF0000;">'email='</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;">$login_email</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">'&amp;pass='</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;">$login_pass</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">'&amp;login=Login'</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_POST, <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;">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-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_FOLLOWLOCATION, <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;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_SSL_VERIFYPEER, <span style="color:#000000; font-weight:bold;">false</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_COOKIEJAR, <span style="color:#FF0000;">"cookie_kayit.txt"</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_COOKIEFILE, <span style="color:#FF0000;">"cookie_kayit.txt"</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;">curl_setopt<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$ch</span>, CURLOPT_USERAGENT, <span style="color:#FF0000;">"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"</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_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;</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_POST, <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_URL, <span style="color:#FF0000;">'http://m.facebook.com/home.php'</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;">$page</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;</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_POST, <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;"><a href="http://www.php.net/preg_match"><span style="color:#000066;">preg_match</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'/name=&quot;post_form_id&quot; value=&quot;(.*)&quot; <span style="color:#000099; font-weight:bold;">\/</span>&gt;'</span>.<a href="http://www.php.net/ucfirst"><span style="color:#000066;">ucfirst</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$first_name</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">'/'</span>, <span style="color:#0000FF;">$page</span>, <span style="color:#0000FF;">$form_id</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:#FF0000;">'post_form_id='</span>.<span style="color:#0000FF;">$form_id</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">'&amp;status='</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;">$status</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">'&amp;update=Update'</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:#FF0000;">'http://m.facebook.com/home.php'</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_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;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>

<p class="sayac_bilgi">87 views</p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/curl-ile-facebook-durumunu-guncelle/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Php İle Büyük Siteler İçin Sitemap Yapma !</title>
		<link>http://www.byumut.com/php-ile-buyuk-siteler-icin-sitemap-yapma/</link>
		<comments>http://www.byumut.com/php-ile-buyuk-siteler-icin-sitemap-yapma/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 09:14:02 +0000</pubDate>
		<dc:creator>byumut</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[kod]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php sitemap]]></category>
		<category><![CDATA[sitemap]]></category>
<category>kod</category><category>php</category><category>php sitemap</category><category>sitemap</category>
		<guid isPermaLink="false">http://www.byumut.com/?p=283</guid>
		<description><![CDATA[Merhaba arkadaşlar uzun bir aradan sonra tekrar sizlere güzel bir kod paylaşımı yapmak istiyorum . Hem bu şekilde sizlere bu kodları veya bilgilendirmeleri paylaştıkça arşivimide yavaş yavaşta olsa oluşturmuş oluyorum. Geçenlerde Pilli Network'un yeni sitesi olan kodaman.org ' a girdim . Gerçekten güzel bir site olmuş diyorum ve buradan Pilli Network ve Nokta A.Ş ' [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar uzun bir aradan sonra tekrar sizlere güzel bir kod paylaşımı yapmak istiyorum . Hem bu şekilde sizlere bu kodları veya bilgilendirmeleri paylaştıkça arşivimide yavaş yavaşta olsa oluşturmuş oluyorum. Geçenlerde Pilli Network'un yeni sitesi olan <a href="http://www.kodaman.org">kodaman.org</a> ' a girdim . Gerçekten güzel bir site olmuş diyorum ve buradan <a href="http://www.pilli.com.tr">Pilli Network</a> ve <a href="http://www.nokta.com">Nokta A.Ş</a> ' ye teşekkürlerimi iletiyorum . Neyse sitede gezmeye başladığımda daha sadece 3 yazı vardı ve 3. yazı ise bu size vereceğim sitemap.php koduydu. Ve gerçekten kodu incelediğimde bir çok sorunu yokedebilecek bir kod olduğunu düşündüm ve hemen kod sayfasını sık kullanılanlarıma ekledim . Ve o zamandan bu zaman'a kadar üniversitedeki vize sınavlarımla uğraştığım için yazamamıştım . </p>
<p><span id="more-283"></span></p>
<p><strong>Kodumuz şöyle : </strong></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:#000000; font-weight:bold;">&lt;?</span> &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Önce mysql bağlantı bilgilerini içeren php dosyamızı include ediyoruz &nbsp;&nbsp; &nbsp;</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;">$mysqlhost</span>=<span style="color:#FF0000;">"localhost"</span>; &nbsp; &nbsp;&nbsp; &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;">$mysqluser</span>=<span style="color:#FF0000;">"makaleler"</span>; &nbsp; &nbsp;&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;"><span style="color:#0000FF;">$mysqlpass</span>=<span style="color:#FF0000;">"12345"</span>; &nbsp; &nbsp;&nbsp; &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;">$mysqldatabase</span>=<span style="color:#FF0000;">"makaleler"</span>; &nbsp; &nbsp;&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;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>! <span style="color:#0000FF;">$baglanti</span>=@<a href="http://www.php.net/mysql_connect"><span style="color:#000066;">mysql_connect</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$mysqlhost</span>, <span style="color:#0000FF;">$mysqluser</span>, <span style="color:#0000FF;">$mysqlpass</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <a href="http://www.php.net/die"><span style="color:#000066;">die</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"veritabani baglantisi yok."</span><span style="color:#006600; font-weight:bold;">&#41;</span>; &nbsp;&nbsp; &nbsp; </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/mysql_select_db"><span style="color:#000066;">mysql_select_db</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$mysqldatabase</span><span style="color:#006600; font-weight:bold;">&#41;</span>; &nbsp; &nbsp;&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;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// İkinci olarak sayfa output'unun hangi formatta olduğunu belirten header komutunu gönderiyoruz. Sayfamız xml formatında olacaktır. &nbsp;&nbsp; &nbsp;</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;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Content-Type: text/xml"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Get metoduyla aldığımız sayfa verisini $sayfa isimli değişkene atıyoruz. &nbsp;&nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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>! <a href="http://www.php.net/isset"><span style="color:#000066;">isset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_GET</span><span style="color:#006600; font-weight:bold;">&#91;</span>sayfa<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#0000FF;">$sayfa</span>=<span style="color:#CC66CC;color:#800000;">1</span>; <span style="color:#616100;">else</span> <span style="color:#0000FF;">$sayfa</span>=<span style="color:#0000FF;">$_GET</span><span style="color:#006600; font-weight:bold;">&#91;</span>sayfa<span style="color:#006600; font-weight:bold;">&#93;</span>; &nbsp;&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;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Tarihi belirtiyoruz. Burada format önemli. Format dışına çıkılmamalı. Eğer veritabanınızda her makalenin giriş tarihi varsa dinamik olarak onu da ekleyebilirsiniz. Burada sabit bir gün kullandım. &nbsp; &nbsp;&nbsp; &nbsp; </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;">$date</span>=<span style="color:#FF0000;">"2008-10-21"</span>; &nbsp; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Eğer sayfa değişkeni &quot;index&quot; değeri aldıysa output olarak sitemap-index verilecek. &nbsp;&nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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;">$sayfa</span>==<span style="color:#FF0000;">"index"</span><span style="color:#006600; font-weight:bold;">&#41;</span>: &nbsp; &nbsp;&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;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// İlk olarak bütün makale sayısını alıyoruz. &nbsp; &nbsp;&nbsp; &nbsp;</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;">$index_sayi</span>=<a href="http://www.php.net/mysql_num_rows"><span style="color:#000066;">mysql_num_rows</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT `id` FROM `makaleler`"</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; &nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// İkinci olarak kaç adet index'te kaç adet sitemap listeleneceğini bulmak için, toplam rakamı sitemap başı url sayısına bölüyoruz. Ben genelde veritabanını yormamak ve hızlı yüklenme için 6000 kullanırım. &nbsp;&nbsp; &nbsp; </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;">$index_sayi</span>=<a href="http://www.php.net/ceil"><span style="color:#000066;">ceil</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$index_sayi</span> / <span style="color:#CC66CC;color:#800000;">6000</span><span style="color:#006600; font-weight:bold;">&#41;</span>; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">//Google sitemap-index header'larını giriyoruz. Encoding'i dileğinize göre değiştirebilirsiniz. &nbsp;&nbsp; &nbsp; </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;?xml version=<span style="color:#000099; font-weight:bold;">\"</span>1.0<span style="color:#000099; font-weight:bold;">\"</span> encoding=<span style="color:#000099; font-weight:bold;">\"</span>UTF-8<span style="color:#000099; font-weight:bold;">\"</span>?&gt; &nbsp; &nbsp;&nbsp; &nbsp;</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:#FF0000;">&lt;sitemapindex xmlns=<span style="color:#000099; font-weight:bold;">\"</span>http://www.sitemaps.org/schemas/sitemap/0.9<span style="color:#000099; font-weight:bold;">\"</span>&gt;<span style="color:#000099; font-weight:bold;">\n</span>"</span>; &nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Ana etiketleri girdikten sonra sitemap'ları döngü ile listeliyoruz. &nbsp;&nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span>=<span style="color:#CC66CC;color:#800000;">0</span>; <span style="color:#0000FF;">$i</span>&lt;<span style="color:#0000FF;">$index_sayi</span>; <span style="color:#0000FF;">$i</span>++<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span> &nbsp; &nbsp;&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;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;sitemap&gt; &nbsp; &nbsp;&nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;loc&gt;http://www.butunmakaleler.com/sitemap.php?sayfa="</span>.<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span>+<span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">"&lt;/loc&gt; &nbsp;&nbsp; &nbsp; </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:#FF0000;">&lt;lastmod&gt;$date&lt;/lastmod&gt; &nbsp; &nbsp;&nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;/sitemap&gt;<span style="color:#000099; font-weight:bold;">\n</span>"</span>; &nbsp;&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;"><span style="color:#006600; font-weight:bold;">&#125;</span> &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Son olarak sitemap-index sonlandırma etiketini girip index'i bitiriyoruz. &nbsp;&nbsp; &nbsp; </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;/sitemapindex&gt;"</span>; &nbsp; &nbsp;&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;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Eğer GET ile aldığımız sayfa değişkeni numerik ise bu kodlar çalışacak. &nbsp; &nbsp;&nbsp; &nbsp;</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;">else</span>: &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Sayfa numarasına göre 6000'lik veri alınıyor. &nbsp; &nbsp;&nbsp; &nbsp;</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;">$sorgu</span>=<a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT `id` FROM `makaleler` ORDER BY `id` ASC LIMIT "</span>.<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sayfa</span>-<span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>*<span style="color:#CC66CC;color:#800000;">6000</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#FF0000;">",6000"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; &nbsp;&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;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Sitemap ana xml etiketleri giriliyor. &nbsp; &nbsp;&nbsp; &nbsp;</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;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;?xml version=<span style="color:#000099; font-weight:bold;">\"</span>1.0<span style="color:#000099; font-weight:bold;">\"</span> encoding=<span style="color:#000099; font-weight:bold;">\"</span>UTF-8<span style="color:#000099; font-weight:bold;">\"</span> ?&gt; &nbsp;&nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;urlset xmlns=<span style="color:#000099; font-weight:bold;">\"</span>http://www.google.com/schemas/sitemap/0.84<span style="color:#000099; font-weight:bold;">\"</span> xmlns:xsi=<span style="color:#000099; font-weight:bold;">\"</span>http://www.w3.org/2001/XMLSchema-instance<span style="color:#000099; font-weight:bold;">\"</span> &nbsp; &nbsp;&nbsp; &nbsp;</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:#FF0000;">xsi:schemaLocation=<span style="color:#000099; font-weight:bold;">\"</span>http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd<span style="color:#000099; font-weight:bold;">\"</span>&gt;<span style="color:#000099; font-weight:bold;">\n</span>"</span>; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Alınan 6000'lik parça döngü ile yazdırılıyor. &nbsp; &nbsp;&nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sonuc</span>=<a href="http://www.php.net/mysql_fetch_assoc"><span style="color:#000066;">mysql_fetch_assoc</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sorgu</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>: &nbsp; &nbsp;&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;&nbsp; &nbsp; </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;url&gt; &nbsp; &nbsp;&nbsp; &nbsp;</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:#FF0000;">&lt;loc&gt;http://www.butunmakaleler.com/makale.php?id="</span>.<span style="color:#0000FF;">$sonuc</span><span style="color:#006600; font-weight:bold;">&#91;</span>id<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">"&lt;/loc&gt; &nbsp;&nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;lastmod&gt;$date&lt;/lastmod&gt; &nbsp; &nbsp;&nbsp; &nbsp;</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:#FF0000;">&lt;changefreq&gt;daily&lt;/changefreq&gt; &nbsp;&nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;priority&gt;0.5&lt;/priority&gt; &nbsp; &nbsp;&nbsp; &nbsp;</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:#FF0000;">&lt;/url&gt;<span style="color:#000099; font-weight:bold;">\n</span>"</span>; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#616100;">endwhile</span>; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&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;"><span style="color:#FF9933; font-style:italic;">// Son olarak sitemap'ı sonlandırma etiketini yazdırıp dosyayı kapatıyoruz. &nbsp;&nbsp; &nbsp; </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;/urlset&gt;'</span>; &nbsp;&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;&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">endif</span>; &nbsp;&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;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Kodaman.Org ' tan Alıntı : </strong></p>
<blockquote><p>
Sitemap ya da diğer bir deyişle site haritaları, sitemizin google ve diğer arama motorlarına daha hızlı endekslenmesini sağlayan önemli faktörlerden biri.</p>
<p>Bir site haritası temel olarak sitemizin içindeki sayfaların bir listesini içeren bir tür xml dosyasıdır.</p>
<p>Sitemizin haritasını çıkarmak için, eğer sitemiz küçük veya orta ölçekteyse hazır araçlar kullanabiliriz. Bu araçlar genelde crawling mantığı ile çalışırlar. Fakat örneğin sitemizde en az 200.000 sayfa varsa, bu durumda kullandığımız hazır araçlar site haritası yapımında sadece zaman kaybına sebep olacaktır.</p>
<p>Bir sitemiz olsun ve ismi butunmakaleler.com olsun. Sitemizin 300.000 sayfa/makale'den oluşan bir site olduğunu ve php/mysql üzerinde çalıştığını varsayalım.</p>
<p>Site uri yapısı da şu şekilde olsun.</p>
<p>http://www.butunmakaleler.com/makale.php?id=223</p>
<p>Şimdi sitemiz için php ile kısa yoldan bir sitemap hazırlayacağız.</p>
<p>Fakat öncelikle google sitemap'ın kısıtlamalarını bilmemiz gerekiyor. Bunları kısaca sayarsak,</p>
<p>- Bir sitemap dosyasında maksimum 50.000 url olabilir.<br />
- Bir sitemap dosyası gzip ile maksimum 1 MB, gzip'siz maksimum 10 MB olabilir.</p>
<p>Biraz akıllı bir webmaster bu durumda google sitemap için 45.000 url'den oluşan 7 tane sitemap hazırlamak gerektiğini düşünecektir. Fakat sitemap-index kullanarak tek tek 7 adet sitemap hazırlamaktan kurtulmamız mümkündür.</p>
<p>Sitemap-index bir sitenin sitemap'larının listesini veren xml tabanlı bir dosyadır.</p>
<p>300.000 makale içeren sitemizde, veritabanı tablosunda her makalenin unique bir numarası mevcuttur.</p>
<p>Sitemizin sitemap'ını sadece bir php kullanarak hazırlayacağız.</p>
<p>Dosyamızın ismi sitemap.php olsun ve sitenin ana dizininde bulunsun. Dosyaya sayfa isminde bir get değişkeni atayalım. Script Sayfa değişkeni index değerini aldığında sitemap-index'i, numara aldığında ise sitemap'ı göstersin.</p>
</blockquote>

<p class="sayac_bilgi">33 views</p>
]]></content:encoded>
			<wfw:commentRss>http://www.byumut.com/php-ile-buyuk-siteler-icin-sitemap-yapma/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

