<?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>Adem Alp YILDIZ &#187; PHP</title>
	<atom:link href="http://www.ademalpyildiz.com.tr/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ademalpyildiz.com.tr</link>
	<description>Hayatı dürtmeye devam...</description>
	<lastBuildDate>Tue, 04 May 2010 14:08:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP ile Türkçe Karakter Sıralama</title>
		<link>http://www.ademalpyildiz.com.tr/2010/05/03/php-ile-turkce-karakter-siralama/</link>
		<comments>http://www.ademalpyildiz.com.tr/2010/05/03/php-ile-turkce-karakter-siralama/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:28:11 +0000</pubDate>
		<dc:creator>Adem Alp YILDIZ</dc:creator>
				<category><![CDATA[Genel]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ademalpyildiz.com.tr/?p=78</guid>
		<description><![CDATA[Kod: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 $harf = &#34;AaBbCcÇçDdEeFfGgĞğHhIıİiJjKkLlMmNnOoÖöPpRrSsŞşTtUuÜüVvYyZz&#34;; $harfler = str_split&#40;$harf,1&#41;; &#160; function turkcesirala&#40;$a,$b&#41; &#123; global $harfler; $ha = array_search&#40;substr&#40;$a,0,1&#41;,$harfler&#41;; $hb = array_search&#40;substr&#40;$b,0,1&#41;,$harfler&#41;; if&#40;$ha &#62;= $hb&#41; return true; else return false; &#125; &#160; $yazarlar = array&#40;&#34;Öküz&#34;=&#62;1,&#34;At&#34;=&#62;2,&#34;Çeşit&#34;=&#62;3,&#34;Zeytin&#34;=&#62;4,&#34;Ğeviş&#34;=&#62;5,&#34;Gev&#34;=&#62;6&#41;; &#160; uksort&#40;$yazarlar,&#34;turkcesirala&#34;&#41;; &#160; var_export&#40;$yazarlar&#41;; Sonuç: 1 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Kod:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$harf</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;AaBbCcÇçDdEeFfGgĞğHhIıİiJjKkLlMmNnOoÖöPpRrSsŞşTtUuÜüVvYyZz&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$harfler</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_split</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$harf</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> turkcesirala<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$harfler</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$ha</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_search</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$harfler</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$hb</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_search</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$harfler</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ha</span> <span style="color: #339933;">&gt;=</span> <span style="color: #000088;">$hb</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$yazarlar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Öküz&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;At&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Çeşit&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Zeytin&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Ğeviş&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Gev&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">uksort</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$yazarlar</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;turkcesirala&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">var_export</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$yazarlar</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Sonuç:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="plain" style="font-family:monospace;">array (
  'At' =&gt; 2,
  'Çeşit' =&gt; 3,
  'Gev' =&gt; 6,
  'Ğeviş' =&gt; 5,
  'Öküz' =&gt; 1,
  'Zeytin' =&gt; 4,
)</pre></td></tr></table></div>

<p>Güncelleme: Sadece ilk karakterlerin sırasının önemli olduğu bir yerde kullanılmak için yazılmıştır. Ömer ÜÇEL&#8217;in belirttiği şekilde kullanılırsa tüm karakterler göz önüne alınarak sıralayacaktır.</p>
<p>Kod:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">setlocale</span><span style="color: #009900;">&#40;</span>LC_ALL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'tr_TR.UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$yazarlar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Öküz&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;At&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Çeşit&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Zeytin&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Ğeviş&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Gev&quot;</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ksort</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$yazarlar</span><span style="color: #339933;">,</span> SORT_LOCALE_STRING<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ademalpyildiz.com.tr/2010/05/03/php-ile-turkce-karakter-siralama/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bir Metindeki Adresleri Linke Çevirmek</title>
		<link>http://www.ademalpyildiz.com.tr/2009/09/04/bir-metindeki-adresleri-linke-cevirmek/</link>
		<comments>http://www.ademalpyildiz.com.tr/2009/09/04/bir-metindeki-adresleri-linke-cevirmek/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 08:38:43 +0000</pubDate>
		<dc:creator>Adem Alp YILDIZ</dc:creator>
				<category><![CDATA[Genel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[url search]]></category>

		<guid isPermaLink="false">http://www.ademalpyildiz.com.tr/?p=66</guid>
		<description><![CDATA[Bir arkadaşın ihtiyacı için bulup buluşturduğum bir kod parçası Kullanılan regexp cümleciği 1 @(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@ Örnek kod 1 2 3 4 5 6 $string='deneme olarak http://sayfa.site.com/goster/icerik.html bu linki ve http://sayfa.site.com/sakla/icerik.html sadece yazı içinden alıp link yapacak.'; &#160; $string = preg_replace&#40;'@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '&#60;a href=&#34;$1&#34;&#62;$1&#60;/a&#62;', $string&#41;; Örnek kodun çıktısı 1 2 3 deneme olarak &#60;a href=&#34;http://sayfa.site.com/goster/icerik.html&#34;&#62;http://sayfa.site.com/goster/icerik.html&#60;/a&#62; bu linki ve [...]]]></description>
			<content:encoded><![CDATA[<p>Bir arkadaşın ihtiyacı için bulup buluşturduğum bir kod parçası</p>
<p>Kullanılan regexp cümleciği</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="plain" style="font-family:monospace;">@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@</pre></td></tr></table></div>

<p>Örnek kod</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$string</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'deneme olarak http://sayfa.site.com/goster/icerik.html
bu linki ve http://sayfa.site.com/sakla/icerik.html sadece
yazı içinden alıp link yapacak.'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@'</span><span style="color: #339933;">,</span> 
<span style="color: #0000ff;">'&lt;a href=&quot;$1&quot;&gt;$1&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Örnek kodun çıktısı</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">deneme olarak &lt;a href=&quot;http://sayfa.site.com/goster/icerik.html&quot;&gt;http://sayfa.site.com/goster/icerik.html&lt;/a&gt;
bu linki ve &lt;a href=&quot;http://sayfa.site.com/sakla/icerik.html&quot;&gt;http://sayfa.site.com/sakla/icerik.html&lt;/a&gt; sadece
yazı içinden alıp link yapacak.</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ademalpyildiz.com.tr/2009/09/04/bir-metindeki-adresleri-linke-cevirmek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery ile RSS besleme okuma</title>
		<link>http://www.ademalpyildiz.com.tr/2008/04/28/jquery-ile-rss-besleme-okuma/</link>
		<comments>http://www.ademalpyildiz.com.tr/2008/04/28/jquery-ile-rss-besleme-okuma/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 13:34:36 +0000</pubDate>
		<dc:creator>Adem Alp YILDIZ</dc:creator>
				<category><![CDATA[Genel]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ademalpyildiz.com.tr/?p=49</guid>
		<description><![CDATA[Aşağıdaki basit kod parçacığı jquery ajax ile rss beslemesini okumak için yazdım. Bir süredir JQuery kullanıyorum. Yine de javascript için tam olarak bir kütüphane(framework de denebilir) kullanmaya alışamadım. class metodlarını kullanarak sayfa içine yerleştirmek mümkün. İlerleyen zamanda onu da yazarım inşallah 1 2 3 4 5 6 7 8 9 10 $.ajax&#40;&#123; type: &#34;GET&#34;, url: [...]]]></description>
			<content:encoded><![CDATA[<p>Aşağıdaki basit kod parçacığı <a href="http://jquery.com">jquery</a> ajax ile rss beslemesini okumak için yazdım. Bir süredir JQuery kullanıyorum. Yine de javascript için tam olarak bir kütüphane(framework de denebilir) kullanmaya alışamadım. class metodlarını kullanarak sayfa içine yerleştirmek mümkün. İlerleyen zamanda onu da yazarım inşallah <img src='http://www.ademalpyildiz.com.tr/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span>
    url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;xml.php?dosya=forum&quot;</span><span style="color: #339933;">,</span><span style="color: #006600; font-style: italic;">//wiki.xml</span>
    dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;xml&quot;</span><span style="color: #339933;">,</span>
    success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>xml<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span>xml<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'item'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cikti&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cikti&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;br /&gt;&lt;a href='&quot;</span><span style="color: #339933;">+</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'link'</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;' target='_blank'&gt;&quot;</span><span style="color: #339933;">+</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Güvenlik nedeniyle mevcut alanadı dışından veri okumaya çalıştığınızda tarayıcı hata veriyor( En azındna firefox veriyor). Bunun önüne geçmek için aşağıdaki gibi basit bir kod iş görüyor.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #000088;">$_D</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;dosya&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dosya'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;wiki&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$dosya</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dosya</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'wiki'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://wiki.linux-sevenler.org/index.php?title=%C3%96zel:Recentchanges&amp;feed=rss&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dosya</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'forum'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://forum.linux-sevenler.org/index.php?PHPSESSID=5bfa9a80662d4857224d9a122299d288&amp;type=rss;action=.xml&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_D</span><span style="color: #339933;">,</span><span style="color: #000088;">$dosya</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dosya</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$_D</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: text/xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> hata<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Not: Ayrıntılı yazmak isterdim ama vakit ancak bu kadarına yetti.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ademalpyildiz.com.tr/2008/04/28/jquery-ile-rss-besleme-okuma/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP Merkez Bankası Döviz Kuru</title>
		<link>http://www.ademalpyildiz.com.tr/2008/02/06/php-merkez-bankasi-doviz-kuru/</link>
		<comments>http://www.ademalpyildiz.com.tr/2008/02/06/php-merkez-bankasi-doviz-kuru/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 10:14:15 +0000</pubDate>
		<dc:creator>Adem Alp YILDIZ</dc:creator>
				<category><![CDATA[Genel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programlama]]></category>

		<guid isPermaLink="false">http://www.ademalpyildiz.com.tr/2008/02/06/php-merkez-bankasi-doviz-kuru/</guid>
		<description><![CDATA[Kod: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $para = array&#40; &#34;USD/TRY&#34;,&#34;AUD/TRY&#34;,&#34;DKK/TRY&#34;, &#34;EUR/TRY&#34;,&#34;GBP/TRY&#34;,&#34;CHF/TRY&#34;, &#34;SEK/TRY&#34;,&#34;CAD/TRY&#34;,&#34;KWD/TRY&#34;, &#34;NOK/TRY&#34;,&#34;SAR/TRY&#34;,&#34;JPY/TRY&#34;, &#34;BGL/TRY&#34;,&#34;SYP/TRY&#34;,&#34;JOD/TRY&#34;, &#34;ILS/TRY&#34;,&#34;RON/TRY&#34;,&#34;IRR/TRY&#34;&#41;; $dosya=file&#40;&#34;http://www.tcmb.gov.tr/kurlar/today.html?&#34;&#41;; for&#40;$i=0;$i &#60; count&#40;$dosya&#41;;$i++&#41; &#123; for&#40;$j=0; $j &#60; count&#40;$para&#41; ; $j++&#41; &#123; if&#40;ereg&#40;$para&#91;$j&#93;, $dosya&#91;$i&#93;&#41;&#41; &#123; $temp = split&#40;&#34;[[:space:]]{2,}&#34; , $dosya&#91;$i&#93;&#41;; $t = $temp&#91;0&#93;; for&#40;$k=0; $k [...]]]></description>
			<content:encoded><![CDATA[<p>Kod:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$para</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>	<span style="color: #0000ff;">&quot;USD/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;AUD/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;DKK/TRY&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">&quot;EUR/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;GBP/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;CHF/TRY&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">&quot;SEK/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;CAD/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;KWD/TRY&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">&quot;NOK/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;SAR/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;JPY/TRY&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">&quot;BGL/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;SYP/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;JOD/TRY&quot;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">&quot;ILS/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;RON/TRY&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;IRR/TRY&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dosya</span><span style="color: #339933;">=</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.tcmb.gov.tr/kurlar/today.html?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dosya</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$j</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$para</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span> <span style="color: #000088;">$j</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$para</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dosya</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$temp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;[[:space:]]{2,}&quot;</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$dosya</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$k</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$cikti</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//print_r($cikti);</span></pre></td></tr></table></div>

<p>Çıktı:
</pre>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">Array
(
    [USD/TRY] =&gt; Array
        (
            [0] =&gt; USD/TRY
            [1] =&gt; 1 ABD DOLARI
            [2] =&gt; 1.1640
            [3] =&gt; 1.1696
            [4] =&gt; 1.1632
            [5] =&gt; 1.1714
&nbsp;
        )
&nbsp;
    [AUD/TRY] =&gt; Array
        (
            [0] =&gt; AUD/TRY
            [1] =&gt; 1 AVUSTRALYA DOLARI
            [2] =&gt; 1.0511
            [3] =&gt; 1.0580
            [4] =&gt; 1.0463
            [5] =&gt; 1.0643
&nbsp;
        )
...</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ademalpyildiz.com.tr/2008/02/06/php-merkez-bankasi-doviz-kuru/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
