<?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>Flash/Flex Developer &#187; Php</title>
	<atom:link href="http://blog.ismailsimsek.com/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ismailsimsek.com</link>
	<description></description>
	<lastBuildDate>Thu, 22 Dec 2011 14:58:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Php – AS3 veri iletişimi [Actionscript PhpData Class]</title>
		<link>http://blog.ismailsimsek.com/php/php-%e2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html</link>
		<comments>http://blog.ismailsimsek.com/php/php-%e2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html#comments</comments>
		<pubDate>Mon, 30 May 2011 07:33:24 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[actionscript php iletişimi]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[php data class]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=547</guid>
		<description><![CDATA[Daha önce şu yazımda anlattığım olayı birazcık basitleştiren bir sınıf yazdım. Daha doğrusu ben bu işte çok çok yeniyken Tuncay arkadaşım bana bu sınıfı test etmem için göndermişti. Ben hiç kullanmamıştım bu sınıfı. Üzerinde biraz değişiklik yaparak sınıfı güncelledim. En basit halinde şuan. İstediğiniz gibi geliştirebilirsiniz. Gelelim ne yapacağımıza. Öncelikle basit düzeyde php ile veri alışverişini gerçekleştireceğiz. Öncelikle php dosyamızı hazırlayalım. İlk olarak sadece veri çekeceğiz. Bu yüzden sadece alttaki satır bizim için yeterli. PLAIN [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Daha önce <a title="Actionscript 3.0 – Php – MySql veri alışverişi" href="http://blog.ismailsimsek.com/php/actionscript-3-0-php-mysql-veri-alisverisi.html" target="_blank">şu yazımda</a> anlattığım olayı birazcık basitleştiren bir sınıf yazdım. Daha doğrusu ben bu işte çok çok yeniyken Tuncay arkadaşım bana bu sınıfı test etmem için göndermişti. Ben hiç kullanmamıştım bu sınıfı. Üzerinde biraz değişiklik yaparak sınıfı güncelledim. En basit halinde şuan. İstediğiniz gibi geliştirebilirsiniz.</p>
<p class="MsoNormal">Gelelim ne yapacağımıza. Öncelikle basit düzeyde php ile veri alışverişini gerçekleştireceğiz. Öncelikle php dosyamızı hazırlayalım. İlk olarak sadece veri çekeceğiz. Bu yüzden sadece alttaki satır bizim için yeterli.</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-5">
<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;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'email=biremailadresi@gmail.com&amp;isim=ismail&amp;soyisim=simsek'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p class="MsoNormal">Burada verileri özellikle bu şekilde yazdım. Birden fazla<br />
veriyi as3’e post etmek için şuanki sistemimizde en basit ve kullanışlı yöntem.</p>
<p class="MsoNormal">Şimdi bir flash dökümanı açalım ve DocumentClass olarak<br />
Main.as dosyası oluşturalım.</p>
<p class="MsoNormal"><a href="http://blog.ismailsimsek.com/wp-content/uploads/2011/05/docclass.jpg"><img class="alignleft size-medium wp-image-550" title="docclass" src="http://blog.ismailsimsek.com/wp-content/uploads/2011/05/docclass.jpg" alt="" /></a></p>
<p><a title="Php Data Class" href="http://www.ismailsimsek.com/ie/as3php/phpdataclass.7z" target="_blank">Php Data Class</a>’ı buradan indirip import edelim.</p>
<p>Öncelikle sınıfı biraz açıklayalım. Php.as dosyasını herhangi bir text editörü ile açın. “getData” fonksiyonu ile bir php dosyasından veri çekiyoruz. (ilk olarak bu fonksiyonu kullanacağız.) Bu veri çekim işlemi tamamlandığında “DATA_LOADED” eventi dispatch ediliyor. Diğer donksiyonu yazının ilerleyen kısmında anlatacağım.</p>
<p>Şimdi aşağıdaki kodları yazalım.</p>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-6">
<div class="actionscript">
<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;">package <span style="color: #66cc66;">&#123;</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: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ismail</span>.<span style="color: #006600;">net</span>.<span style="color: #006600;">php</span>.<span style="color: #006600;">PhpData</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: #0066CC;">import</span> com.<span style="color: #006600;">ismail</span>.<span style="color: #006600;">net</span>.<span style="color: #006600;">php</span>.<span style="color: #006600;">PhpDataEvent</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLVariables</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</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: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> php:PhpData;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php = <span style="color: #000000; font-weight: bold;">new</span> PhpData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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;">php.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhpDataEvent.<span style="color: #006600;">DATA_LOADED</span>, dataGeldi<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">getData</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://localhost/deneme/flPhpCl/phpfile.php"</span><span style="color: #66cc66;">&#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: #66cc66;">&#125;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> dataGeldi<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:PhpDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</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: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">item</span>.<span style="color: #006600;">email</span><span style="color: #66cc66;">&#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: #66cc66;">&#125;</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: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Burada bir Php isimli class’ımızdan bir referans oluşturduk. Daha sonra bir event listener ekledik. Çağırdığımız php dosyasından veri bize ulaştığında “dataGeldi” fonksiyonunun tetiklenmesini sağladık. Daha sonrada php dosyamızın tam yolunu verip çağırdık. Gelen verilere e.item ile ulaşıyoruz. Php dosyasından bize dönen veriler bu objenin içinde.</p>
<p>Şimdi bir veri gönderelim. Bu veriyi php tarafında işleyelim. Main fonksiyonunu şu şekilde değiştiriyoruz.</p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-7">
<div class="actionscript">
<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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #66cc66;">&#123;</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;">php = <span style="color: #000000; font-weight: bold;">new</span> PhpData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #808080; font-style: italic;">/*php.addEventListener(PhpDataEvent.DATA_LOADED, dataGeldi);</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: #808080; font-style: italic;">php.getData(&quot;http://localhost/deneme/flPhpCl/phpfile.php&quot;);*/</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;">php.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhpDataEvent.<span style="color: #006600;">DATA_SENT</span>, onDataSent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">php.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>PhpDataEvent.<span style="color: #006600;">DATA_LOADED</span>, onDataLoaded<span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> gonderilecekData:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"islem"</span>,<span style="color: #ff0000;">"topla"</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"a"</span>,<span style="color: #cc66cc;color:#800000;">47</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"b"</span>,<span style="color: #cc66cc;color:#800000;">17</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</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;">php.<span style="color: #006600;">sendData</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://localhost/deneme/flPhpCl/phpfile.php"</span>, gonderilecekData<span style="color: #66cc66;">&#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: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onDataSent<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:PhpDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Veriler gönderildi."</span><span style="color: #66cc66;">&#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: #66cc66;">&#125;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onDataLoaded<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:PhpDataEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</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: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"veriler geldi."</span><span style="color: #66cc66;">&#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: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"işlem sonucu: "</span> + <span style="color: #0066CC;">e</span>.<span style="color: #006600;">item</span>.<span style="color: #006600;">sonuc</span><span style="color: #66cc66;">&#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: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>“gonderilecekData” isimli arrayi biraz açalım. Örneğin ilk dataya bakalım. [“islem”,”topla”] verisi php tarafında $_POST[‘islem’] olarak çekilecek.<br />
Php kodlarımızda şu şekilde:</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;">$islemTipi</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'islem'</span><span style="color:#006600; font-weight:bold;">&#93;</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;">$a</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'a'</span><span style="color:#006600; font-weight:bold;">&#93;</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;">$b</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'b'</span><span style="color:#006600; font-weight:bold;">&#93;</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:#616100;">switch</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$islemTipi</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:#006600; font-weight:bold;">&#123;</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;">case</span> <span style="color:#FF0000;">"topla"</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;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> + <span style="color:#0000FF;">$b</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;">break</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;">case</span> <span style="color:#FF0000;">"cikar"</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;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> - <span style="color:#0000FF;">$b</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;">break</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;">case</span> <span style="color:#FF0000;">"carp"</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;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> * <span style="color:#0000FF;">$b</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;">break</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;">case</span> <span style="color:#FF0000;">"bol"</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;">$islemSonucu</span> = <span style="color:#0000FF;">$a</span> / <span style="color:#0000FF;">$b</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;">break</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>
<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;">"sonuc="</span> . <span style="color:#0000FF;">$islemSonucu</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Burada islem tipine göre kodlar çalıştırılıp sonuc döndürülüyor. Bunu siz daha farklı şekillerde kullanabilirsiniz. Bu da veri alıp göndermeye örnekti.<br />
Konu ile ilgili sorunuz olduğunda sormaktan çekinmeyin.<br />
Bu uygulamanın <a title="Örnek Uygulama Source Files" href="http://www.ismailsimsek.com/ie/as3php/flPhpCl.7z" target="_blank">tüm dosyalarını şuradan</a> indirebilirsiniz.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/php-%e2%80%93-as3-veri-iletisimi-actionscript-phpdata-class.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AmfPhp ve Güvenlik</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/amfphp-ve-guvenlik.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/amfphp-ve-guvenlik.html#comments</comments>
		<pubDate>Tue, 10 May 2011 08:52:37 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[crossdomain]]></category>
		<category><![CDATA[guvenlik]]></category>
		<category><![CDATA[production_server]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=504</guid>
		<description><![CDATA[Amfphp flash ile veritabanı bağlantısı kurmanın en hızlı ve en rahat yolu. Gerekli bağlantıları yaptıktan sonra tek yapmanız gereken bir satırlık bir kod çalıştırmak ve bu kodun döndürdüğü sonucu işleyecek fonksiyonu yazmak. Tabi bu kadar rahatlık o kadar da güvenli değil. Peki güvenli hale getirmek için neler yapabiliriz? 1. Service Browser Öncelikle amfphp içinde ki browser klasörünün ya adını değiştirin ya da tamamen silin. Bildiğiniz gibi bu browser bize büyük kolyalık sağlamanın yanında başkalarıda erişecek [...]]]></description>
			<content:encoded><![CDATA[<p>Amfphp flash ile veritabanı bağlantısı kurmanın en hızlı ve en rahat yolu. Gerekli bağlantıları yaptıktan sonra tek yapmanız gereken bir satırlık bir kod çalıştırmak ve bu kodun döndürdüğü sonucu işleyecek fonksiyonu yazmak. Tabi bu kadar rahatlık o kadar da güvenli değil. Peki güvenli hale getirmek için neler yapabiliriz?</p>
<p><strong>1. </strong><strong>Service Browser</strong></p>
<p>Öncelikle amfphp içinde ki browser klasörünün ya adını değiştirin ya da tamamen silin. Bildiğiniz gibi bu browser bize büyük kolyalık sağlamanın yanında başkalarıda erişecek olursa onlara da büyük kolaylık sağlıyor. Kullandığınız sınıfların, fonksiyonların başkaları tarafından kullanılmasını istemeyiz. Ben adını değiştiriyorum. Çünkü sürekli lazım olabiliyor.</p>
<p><strong>2. </strong><strong>Production Server</strong></p>
<p>gateway.php dosyasında bulunan bu özellik varsayılan olarak “false” değeriyle geliyor. Bunu true olarak ayarlamalıyız. Bu sayede farklı kaynakların projeden bilgi almasını engelleyebiliriz</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showPlainTxt('php-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<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:#FF9933; font-style:italic;">//define(&quot;PRODUCTION_SERVER&quot;, false);</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/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"PRODUCTION_SERVER"</span>, <span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>3. </strong><strong>Crossdomain.xml</strong><strong></strong></p>
<p>crossdomain.xml dosyasının pek çok işlevin sadece birini şuan açıklayacağım. Bu dosyaya yazacağımız bir takım bilgiler ile projemize farklı bir domainlerden bilgi alınmasını ve gönderilmesini engellemiş olacağız. Bu dosyayı sitemizin ana dizinine koyacağız.</p>
<div class="igBar"><span id="lxml-13"><a href="#" onclick="javascript:showPlainTxt('xml-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-13">
<div class="xml">
<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: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span>?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #00bbdd;">&lt;!DOCTYPE cross-domain-policy SYSTEM &quot;http://www.adobe.com/xml/dtds/cross-domain-policy.dtd&quot;&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;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;cross</span>-domain-policy<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;allow</span>-access-from <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">"www.sitenizinadi.com"</span><span style="font-weight: bold; color: black;">/&gt;</span></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: #009900;"><span style="font-weight: bold; color: black;">&lt;/cross</span>-domain-policy<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Eğer <allow-access-from domain="*"/></p>
<p>Şeklinde yazarsanız projenize her yerden ulaşabilir veri alıp gönderebilirsiniz. Geliştirme aşamasında bu şekilde kalsa daha iyi olur. Çünkü veri alışverişi bir güvenlik sorununa takıldı hatasını almazsınız. (Bu problemin kaynağını bulana kadar çok zaman harcamıştım vakti zamanında)</p>
<p><strong>4. </strong><strong>Swf güvenliği</strong></p>
<p>Piyasada bir sürü swf decompile aracı var. Yani swf dosyalarımızı fla ya çevirebilen kullandığımız sınıfları kodları gayet güzel şekilde gösterebilen araçlar. Bu araçlar tarafından kodlarımızın görüntülenmesini engellemek için swf dosyamızı şifrelememiz gerekiyor. Bu konuda tavsiye edebileceğim en güzel program Amayeta SWF Encrypt.</p>
<p><strong>5. </strong><strong>Php Güvenliği</strong></p>
<p>Php dosyalarımızıda korumamız gerekiyor. Her isteyenin içindeki kodu çalıştıramaması gerekiyor. Zaten php dosyalarına ulaşamazlar derseniz yanılırsınız. Es kaza bir php dosyasının yerini buldu diyelim kişi. Sizin sınıflarınız içindeki herhangi bir fonksiyonu çalıştırabilir ya da saçma veriler gönderebilir. Bunu engellemek için küçük bir hileye başvuruyoruz. Sınıfımızın constructor fonksiyonuna aşağıdaki kodları ekliyoruz. Bu sayede ilgili php dosyasına nerden ulaşıldığını kontrol etmiş oluyoruz.</p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showPlainTxt('php-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<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:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'HTTP_HOST'</span><span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#FF0000;">"www.sitenizinadi.com"</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:#006600; font-weight:bold;">&#123;</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/die"><span style="color:#000066;">die</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Lütfen heykırlık yapmayın."</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:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>6. </strong><strong>SQL Injection</strong></p>
<p>Eğer veritabanı bağlantılı bir projeniz varsa en önemli konu sql injection. Çünkü siz de bilirsiniz ki surlarınız ne kadar güçlü olursa olsun içeri sızan küçük bir birlik ortalığı dağıtmaya yeter. Sql injection’dan korunmak için biraz araştırma yapmalısınız. O kadar çok yöntem var ki. Veritabanına her post ettiğiniz veriyi kontrol etmeli özel karakterlerden arındırmalısınız. Yazdığınız basit sql kodları kolayca saf dışı bırakılabilir.</p>
<p><strong>Sonuç:</strong></p>
<p>Güvenlik önlemlerini kendiniz arttırabilirsiniz. Ama hiç bir zaman mükemmel bir güvenlik seviyesi yoktur. O yüzden belirli aralıklarla projenizi yedeklemelisiniz.</p>
<p><strong>Kaynaklar:</strong></p>
<p><strong></strong><a title="AMFPHP Security Basics - Lee Brimelow" href="http://blog.theflashblog.com/?p=419" target="_blank">AMFPHP Security Basics - Lee Brimelow</a><br />
<a title="AMFPHP ve Güvenlik -www.birogrenciklasigi.com" href="http://www.birogrenciklasigi.com/amfphp-ve-guvenlik.html" target="_blank">AMFPHP ve Güvenlik - www.birogrenciklasigi.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/amfphp-ve-guvenlik.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php &#8211; İki objeyi birleştirmek</title>
		<link>http://blog.ismailsimsek.com/php/php-iki-objeyi-birlestirmek.html</link>
		<comments>http://blog.ismailsimsek.com/php/php-iki-objeyi-birlestirmek.html#comments</comments>
		<pubDate>Fri, 18 Feb 2011 11:06:09 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=441</guid>
		<description><![CDATA[Başlık biraz acayip duruyor aslında. İngilizce söyleyince güzel duruyordu aslında. Neyse konumuza dönelim. Demek istediğim şudur. PLAIN TEXT PHP: $obj1-&#62;a="a"; $obj1-&#62;b="b"; $obj2-&#62;c="c"; $obj2-&#62;d="d"; //birleştirdikten sonra ise echo $obj3-&#62;c; //c değerini versin. çözüm ise şu şekilde. PLAIN TEXT PHP: $obj3 = &#40;object&#41;array_merge&#40;&#40;array&#41;$obj1,&#40;array&#41;$obj2&#41;; Herkese kolay gelsin. Kaynak: http://stackoverflow.com/questions/455700/what-is-the-best-method-to-merge-two-php-objects]]></description>
			<content:encoded><![CDATA[<p>Başlık biraz acayip duruyor aslında. İngilizce söyleyince güzel duruyordu aslında. Neyse konumuza dönelim.<br />
<span id="more-441"></span><br />
Demek istediğim şudur.</p>
<div class="igBar"><span id="lphp-17"><a href="#" onclick="javascript:showPlainTxt('php-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-17">
<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;">$obj1</span>-&gt;<span style="color:#006600;">a</span>=<span style="color:#FF0000;">"a"</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;">$obj1</span>-&gt;<span style="color:#006600;">b</span>=<span style="color:#FF0000;">"b"</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;">$obj2</span>-&gt;<span style="color:#006600;">c</span>=<span style="color:#FF0000;">"c"</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;">$obj2</span>-&gt;<span style="color:#006600;">d</span>=<span style="color:#FF0000;">"d"</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:#FF9933; font-style:italic;">//birleştirdikten sonra ise</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:#0000FF;">$obj3</span>-&gt;<span style="color:#006600;">c</span>; <span style="color:#FF9933; font-style:italic;">//c değerini versin. </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>çözüm ise şu şekilde.</p>
<div class="igBar"><span id="lphp-18"><a href="#" onclick="javascript:showPlainTxt('php-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<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;">$obj3</span> = <span style="color:#006600; font-weight:bold;">&#40;</span>object<span style="color:#006600; font-weight:bold;">&#41;</span><a href="http://www.php.net/array_merge"><span style="color:#000066;">array_merge</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#0000FF;">$obj1</span>,<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#0000FF;">$obj2</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Herkese kolay gelsin.</p>
<p>Kaynak: <a href="http://stackoverflow.com/questions/455700/what-is-the-best-method-to-merge-two-php-objects">http://stackoverflow.com/questions/455700/what-is-the-best-method-to-merge-two-php-objects</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/php-iki-objeyi-birlestirmek.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AmfPHP – Flash – Error #2044 hatası ve çözümü</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/amfphp-flash-error-2044-hatasi-ve-cozumu.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/amfphp-flash-error-2044-hatasi-ve-cozumu.html#comments</comments>
		<pubDate>Wed, 29 Sep 2010 07:10:13 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flash player]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=222</guid>
		<description><![CDATA[Merhabalar. Database bağlantılı tüm flash projelerimde amfphp kullanıyorum. Çokta memnunum. Çünkü hızlı çalışıyor, kolay yönetilebiliyor, alıştıkça bırakamıyorsunuz. Genelde hep flex projelerimde kullandım amfphp yi. Benim ısrarlarım sonucunda yeni başladığı projesinde amfphp kullanmaya başlayan arkadaşım her şeyi düzgünce yazmış olmasına rağmen flashın hata verdiğinden yakınıyordu. Kodlarını gönderdi bana: PLAIN TEXT Actionscript: var baglanti:NetConnection = new NetConnection&#40;&#41;; baglanti.connect&#40;"http://localhost/amfphp/gateway.php"&#41;; var responderFnk:Responder = new Responder&#40;responderFunction&#41;; baglanti.call&#40;"osman.osmanClass.denemeFunction", responderFnk, &#123;sayi:256&#125;&#41;; function responderFunction&#40;e:Object&#41;:void &#123; // &#125; Bu kısımda bir sorun yok göründüğü [...]]]></description>
			<content:encoded><![CDATA[<p>Merhabalar.</p>
<p>Database bağlantılı tüm flash projelerimde amfphp kullanıyorum. Çokta memnunum. Çünkü hızlı çalışıyor, kolay yönetilebiliyor, alıştıkça bırakamıyorsunuz. Genelde hep flex projelerimde kullandım amfphp yi. Benim ısrarlarım sonucunda yeni başladığı projesinde amfphp kullanmaya başlayan <a href="http://www.ardaogulcan.com/" target="_blank">arkadaşım</a> her şeyi düzgünce yazmış olmasına rağmen flashın hata verdiğinden yakınıyordu.</p>
<p>Kodlarını gönderdi bana:</p>
<div class="igBar"><span id="lactionscript-22"><a href="#" onclick="javascript:showPlainTxt('actionscript-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-22">
<div class="actionscript">
<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;">var</span> baglanti:<span style="color: #0066CC;">NetConnection</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">baglanti.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"http://localhost/amfphp/gateway.php"</span><span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> responderFnk:Responder = <span style="color: #000000; font-weight: bold;">new</span> Responder<span style="color: #66cc66;">&#40;</span>responderFunction<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">baglanti.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"osman.osmanClass.denemeFunction"</span>, responderFnk, <span style="color: #66cc66;">&#123;</span>sayi:<span style="color: #cc66cc;color:#800000;">256</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#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: #000000; font-weight: bold;">function</span> responderFunction<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</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: #808080; font-style: italic;">//</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Bu kısımda bir sorun yok göründüğü kadarıyla. Bu defa php kodlarını istedim.</p>
<p>osman isimli klasör içinde osmanClass isimli php dosyasını gönderdi. İçeriğide aşağıdaki gibi.</p>
<div class="igBar"><span id="lphp-23"><a href="#" onclick="javascript:showPlainTxt('php-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-23">
<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;">&amp;lt;?php</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;">class</span> osmanClass</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;">&#123;</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;">function</span> osmanClass <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;"><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;"><span style="color:#FF9933; font-style:italic;">//</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>
<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:#000000; font-weight:bold;">function</span> denemeFunction <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$gelenVeri</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:#006600; font-weight:bold;">&#123;</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;">return</span> <span style="color:#0000FF;">$gelenVeri</span>*<span style="color:#CC66CC;color:#800000;">5</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>
<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>
<p>Burada da bir sorun yok görüldüğü üzre. (?&gt; özellikle konmamıştır. Konulmaması daha hayırlıdır. Evet onu koyupta denedik gene aynı sonucu aldık)</p>
<p>İşin garibi hazırladığımız php dosyası amfphp nin browser ekranında süper bi şekilde çalışmaktaydı. Kafayı yememek elde değil.</p>
<p>Biz ayrı ayrı üzerinde çalışmaya devam ettik. 1 saat sonra Arda buldum diye yazdı msnden. Nasıl dedim anlatmaya başladı.</p>
<p>Kullandığı serverdan kaynaklanabileceğini düşünüp xampp'ı kaldırmış. Wamp kurmuş. Sonuç değişmemiş. Sonra nerden aklına geldiyse wampserver ın errorlog dosyasına bakmış. Orada gateway.php dosyasının güncellenmesinin gerektiğini söyleyen bir satır bulmuş. Daha sonra açmış gateway.php dosyasını kontrol etmeye başlamış ve görmüş.</p>
<p>gateway.php dosyası 106. satırdaki şu kodu:</p>
<div class="igBar"><span id="lphp-24"><a href="#" onclick="javascript:showPlainTxt('php-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-24">
<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:#FF9933; font-style:italic;">//You can set this constant appropriately to disable traces and debugging headers</span></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;">//You will also have the constant available in your classes, for changing</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:#FF9933; font-style:italic;">//the mysql server info for example</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/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"PRODUCTION_SERVER"</span>, <span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Buradaki true değerini false yapın sadece.</p>
<p>Böyle yapınca herşey güllük gülistanlık oldu. Bu amfphp nin bir güvenlik önlemiymiş. Direkt flash ide ile amfphpye erişilemiyor. Bir html içerisinden çalışması lazım illaki. Browser ekranının çalışmasıda bunu açıklıyor. Şimdi diyeceksiniz flexte nasıl çalışıyor peki? Ben projeyi run ettiğimde bana html sayfa açıp orada gösteriyor çünkü. Bu nedenle hiç sorun olmuyordu.</p>
<p>İyi çalışmalar herkese.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/amfphp-flash-error-2044-hatasi-ve-cozumu.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Netbeans utf8 sorunu ve çözümü</title>
		<link>http://blog.ismailsimsek.com/php/netbeans-utf8-sorunu-ve-cozumu.html</link>
		<comments>http://blog.ismailsimsek.com/php/netbeans-utf8-sorunu-ve-cozumu.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 09:24:42 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=209</guid>
		<description><![CDATA[Merhabalar. Friendfeed deki netbeans candır kandır feedlerine dayanamayıp netbeansı indirdim yükledim. Ama sorunlar peşimi bırakmadı. Fakat friendfeed aracılığıyla pek çoğunu çözdüm. En önemli sorun olarak utf-8 encoding kalmıştı. Comment satırlarımdaki Türkçe karakterler okunamıyordu. Google amca imdadıma yetişti ve çözümü buldum. Netbeans kurulum dosyası içinde etc klasöründe netbeans.conf dosyasında 6. satırdaki tırnakların içine şu kodu ekliyoruz. -J-Dfile.encoding=UTF-8 kaydedip tekrar netbeansı açtığımızda artık dosyalarımız utf-8 ile gösteriliyor. Hepsi bu kadar. Kaynaklar: FriendFeed ditoinfo]]></description>
			<content:encoded><![CDATA[<p>Merhabalar. Friendfeed deki netbeans candır kandır feedlerine dayanamayıp netbeansı indirdim yükledim. Ama sorunlar peşimi bırakmadı. Fakat friendfeed aracılığıyla pek çoğunu çözdüm. En önemli sorun olarak utf-8 encoding kalmıştı. Comment satırlarımdaki Türkçe karakterler okunamıyordu. Google amca imdadıma yetişti ve çözümü buldum.</p>
<p>Netbeans kurulum dosyası içinde etc klasöründe netbeans.conf dosyasında 6. satırdaki tırnakların içine şu kodu ekliyoruz.</p>
<p><em>-J-Dfile.encoding=UTF-8</em></p>
<p>kaydedip tekrar netbeansı açtığımızda artık dosyalarımız utf-8 ile gösteriliyor. Hepsi bu kadar.</p>
<p>Kaynaklar:</p>
<p><a href="http://ff.im/q5TUQ" target="_blank">FriendFeed</a><br />
<a href="http://ditoinfo.wordpress.com/2007/02/26/netbeans-and-utf8-encoding-2/" target="_blank">ditoinfo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/netbeans-utf8-sorunu-ve-cozumu.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ezSql &#8211; işlem yapılan son id yi öğrenmek</title>
		<link>http://blog.ismailsimsek.com/php/ezsql-islem-yapilan-son-id-yi-ogrenmek.html</link>
		<comments>http://blog.ismailsimsek.com/php/ezsql-islem-yapilan-son-id-yi-ogrenmek.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 09:13:44 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[last id]]></category>
		<category><![CDATA[last insert id]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=205</guid>
		<description><![CDATA[Merhaba millet. Veritabanımıza yeni bir satır eklediğimizde sildiğimizde yada bir satırı güncellediğimizde ezSql bu satırların id lerini bizim için saklar. Örneğin yeni bir satır eklediniz ve bu eklediğiniz satırın id sini çekmeniz gerekiyor. Yani auto increment olan alandaki son girişi verecektir. ezSql ile bu bilgiye şu şekilde ulaşıyoruz. Öncelikle işlemimizi yapalım. PLAIN TEXT PHP: $db-&#62;query&#40;"insert intotablo_adi values('','birinci veri','ikinci veri...','üçüncü veri...')"&#41;; echo $db-&#62;insert_id; Hepsi bu kadar. Bunu bulabilmek için 4-5 projemin tüm kodlarını ve google ı [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba millet.</p>
<p>Veritabanımıza yeni bir satır eklediğimizde sildiğimizde yada bir satırı güncellediğimizde ezSql bu satırların id lerini bizim için saklar. Örneğin yeni bir satır eklediniz ve bu eklediğiniz satırın id sini çekmeniz gerekiyor. Yani auto increment olan alandaki son girişi verecektir.</p>
<p>ezSql ile bu bilgiye şu şekilde ulaşıyoruz.</p>
<p>Öncelikle işlemimizi yapalım.</p>
<div class="igBar"><span id="lphp-26"><a href="#" onclick="javascript:showPlainTxt('php-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-26">
<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;">$db</span>-&gt;<span style="color:#006600;">query</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"insert intotablo_adi values('','birinci veri','ikinci veri...','üçüncü veri...')"</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/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$db</span>-&gt;<span style="color:#006600;">insert_id</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Hepsi bu kadar. Bunu bulabilmek için 4-5 projemin tüm kodlarını ve google ı alt üst ettim :) Basit ama çabuk unutuluyor. Kolay gelsin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/ezsql-islem-yapilan-son-id-yi-ogrenmek.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash Builder &#8211; AmfPHP &#8211; ezSQL &#8211; Bölüm 1 &#8211; Veri Kaydı</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/flash-builder-amfphp-ezsql-bolum-1-veri-kaydi.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/flash-builder-amfphp-ezsql-bolum-1-veri-kaydi.html#comments</comments>
		<pubDate>Sat, 24 Jul 2010 11:37:57 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[extends]]></category>
		<category><![CDATA[extract]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[flash builder 4]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=187</guid>
		<description><![CDATA[Merhabalar. Bu yazımda AmfPHP ve ezSQL ile Flash Builder kullanarak nasıl daha rahat veri kaydedebileceğimizi göstereceğim. Öncelikle gerekli dosyaları edinelim. ezSQL’i şu adresten indirelim. Bu benim Türkçe karakterler için düzeltme uyguladığım dosya. Bir önceki yazımda bahsetmiştim. Daha sonra amfphp yi şu adresten indirelim. Son olarak amfphp bağlantısını her seferinde yeniden yazmak beni sıktığı için kendi hazırladığım çok basit amfphp sınıfını indiriyoruz. Şimdide Flash Builderda yeni bir proje açıp email ve şifre girişi yapılan bir form [...]]]></description>
			<content:encoded><![CDATA[<p>Merhabalar.</p>
<p>Bu yazımda AmfPHP ve ezSQL ile Flash Builder kullanarak nasıl daha rahat veri kaydedebileceğimizi göstereceğim.<br />
Öncelikle gerekli dosyaları edinelim. ezSQL’i <a href="http://www.ismailsimsek.com/dosya/ezSQL.rar">şu adresten</a> indirelim. Bu benim Türkçe karakterler için düzeltme uyguladığım dosya. <a href="http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html" target="_blank">Bir önceki yazımda</a> bahsetmiştim. Daha sonra amfphp yi <a href="http://sourceforge.net/projects/amfphp/files/amfphp/amfphp%201.9.zip/download" target="_blank">şu adresten</a> indirelim. Son olarak amfphp bağlantısını her seferinde yeniden yazmak beni sıktığı için <a href="http://www.ismailsimsek.com/dosya/AmfPHP_Connect.rar">kendi hazırladığım çok basit amfphp sınıfını</a> indiriyoruz.</p>
<p>Şimdide Flash Builderda yeni bir proje açıp email ve şifre girişi yapılan bir form oluşturuyoruz.</p>
<div class="igBar"><span id="lhtml-30"><a href="#" onclick="javascript:showPlainTxt('html-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-30">
<div class="html">
<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: #ddbb00;">&amp;lt;</span>mx:Form<span style="color: #ddbb00;">&amp;gt;</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: #ddbb00;">&amp;lt;</span>mx:FormHeading label=<span style="color: #ddbb00;">&amp;quot;</span>Kullanıcı Girişi<span style="color: #ddbb00;">&amp;quot;</span>/<span style="color: #ddbb00;">&amp;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: #ddbb00;">&amp;lt;</span>mx:FormItem label=<span style="color: #ddbb00;">&amp;quot;</span>E-Mail<span style="color: #ddbb00;">&amp;quot;</span><span style="color: #ddbb00;">&amp;gt;</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: #ddbb00;">&amp;lt;</span>s:TextInput id=<span style="color: #ddbb00;">&amp;quot;</span>email<span style="color: #ddbb00;">&amp;quot;</span>/<span style="color: #ddbb00;">&amp;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: #ddbb00;">&amp;lt;</span>/mx:FormItem<span style="color: #ddbb00;">&amp;gt;</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: #ddbb00;">&amp;lt;</span>mx:FormItem label=<span style="color: #ddbb00;">&amp;quot;</span>Şifre<span style="color: #ddbb00;">&amp;quot;</span><span style="color: #ddbb00;">&amp;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; &nbsp; &nbsp; <span style="color: #ddbb00;">&amp;lt;</span>s:TextInput id=<span style="color: #ddbb00;">&amp;quot;</span>sifre<span style="color: #ddbb00;">&amp;quot;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;displayAsPassword=<span style="color: #ddbb00;">&amp;quot;</span>true<span style="color: #ddbb00;">&amp;quot;</span>/<span style="color: #ddbb00;">&amp;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: #ddbb00;">&amp;lt;</span>/mx:FormItem<span style="color: #ddbb00;">&amp;lt;</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: #ddbb00;">&amp;lt;</span>mx:FormItem<span style="color: #ddbb00;">&amp;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; &nbsp; &nbsp; <span style="color: #ddbb00;">&amp;lt;</span>s:Button click=<span style="color: #ddbb00;">&amp;quot;</span>onClick()<span style="color: #ddbb00;">&amp;quot;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label=<span style="color: #ddbb00;">&amp;quot;</span>Giriş Yap<span style="color: #ddbb00;">&amp;quot;</span>/<span style="color: #ddbb00;">&amp;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: #ddbb00;">&amp;lt;</span>/mx:FormItem<span style="color: #ddbb00;">&amp;gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ddbb00;">&amp;lt;</span>/mx:Form<span style="color: #ddbb00;">&amp;gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Sınıfımızı import edip gerekli verileri gönderelim.</p>
<div class="igBar"><span id="lactionscript-31"><a href="#" onclick="javascript:showPlainTxt('actionscript-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-31">
<div class="actionscript">
<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: #0066CC;">import</span> com.<span style="color: #006600;">ismail</span>.<span style="color: #006600;">amfphp</span>.<span style="color: #0066CC;">Connect</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">Alert</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> amf:<span style="color: #0066CC;">Connect</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; amf = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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; amf.<span style="color: #006600;">setPaths</span><span style="color: #66cc66;">&#40;</span>&amp;quot;denemeClass.<span style="color: #006600;">MainDenemeClass</span>&amp;quot;,&amp;quot;http:<span style="color: #808080; font-style: italic;">//localhost/amfphp/gateway.php&amp;quot;);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onClick<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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: #66cc66;">&#123;</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: #000000; font-weight: bold;">var</span> obj:<span style="color: #0066CC;">Object</span> =  <span style="color: #66cc66;">&#123;</span>email:email.<span style="color: #0066CC;">text</span>,sifre:sifre.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#125;</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; amf.<span style="color: #006600;">amfphp</span><span style="color: #66cc66;">&#40;</span>&amp;quot;kayitEkle&amp;quot;,obj,kayitSonucu<span style="color: #66cc66;">&#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: #66cc66;">&#125;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> kayitSonucu <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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: #66cc66;">&#123;</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: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == &amp;quot;<span style="color: #cc66cc;color:#800000;">1</span>&amp;quot;<span style="color: #66cc66;">&#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: #66cc66;">&#123;</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; Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>&amp;quot;Kayit Başarılı.&amp;quot;<span style="color: #66cc66;">&#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: #66cc66;">&#125;</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: #b1b100;">else</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: #66cc66;">&#123;</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; Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>&amp;quot;Başarısız.&amp;quot;<span style="color: #66cc66;">&#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: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
amf.setPaths() fonksiyonu bizden iki tane veri bekliyor. Birinci veri amfphp nin gateway.php dosyasının yolu. Çünkü bunun üzerinden iletişim kuracak. Diğer veri ise bizim işlemleri yapacak olan php dosyamızın yolu. Bu şekilde yazmamın nedeni şu. Bu adres her veri isteğinde yazılmak zorunda. Biz bir kere verip kurtuluyoruz :D "denemeClass" services klasörü içindeki benim sınıfımın bulunduğu klasör "MainDenemeClass" ise php dosyamın adı.<br />
Gelelim php dosyamıza. Onunda içeriği şu şekilde</p>
<div class="igBar"><span id="lphp-32"><a href="#" onclick="javascript:showPlainTxt('php-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-32">
<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;">&amp;lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include_once</span> <span style="color:#FF0000;">'ez_sql_core.php'</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;">include_once</span> <span style="color:#FF0000;">'ez_sql_mysql.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:#000000; font-weight:bold;">class</span> MainDenemeClass extends ezSQL_mysql</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;">&#123;</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:#000000; font-weight:bold;">function</span> MainDenemeClass<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;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</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:#616100;">include_once</span> <span style="color:#FF0000;">'db.php'</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:#0000FF;">$this</span>-&amp;gt;ezSQL_mysql <span style="color:#006600; font-weight:bold;">&#40;</span> DB_USER, DB_PASS, DB_NAME, DB_HOST <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;">&#125;</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;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">function</span> kayitEkle<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$gelenVeri</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:#006600; font-weight:bold;">&#123;</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; <a href="http://www.php.net/extract"><span style="color:#000066;">extract</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$gelenVeri</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;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$qq</span> = <span style="color:#0000FF;">$this</span>-&amp;gt;query<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;insert into uyeler values<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">''</span>,<span style="color:#FF0000;">'$email'</span>,<span style="color:#FF0000;">'$sifre'</span><span style="color:#006600; font-weight:bold;">&#41;</span>&amp;quot;<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; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$qq</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; &nbsp; &nbsp; <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; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#CC66CC;color:#800000;">1</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:#006600; font-weight:bold;">&#125;</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:#616100;">else</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:#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; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#CC66CC;color:#800000;">0</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:#006600; font-weight:bold;">&#125;</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:#006600; font-weight:bold;">&#125;</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>
Sonunda ?> yok farkettiyseniz. Gerekte yok. Bazen sorun çıkartabiliyor o yüzden koymuyorum. Burada yine aynı sırayla dosyalarımızı import ediyoruz ve sınıfımızı ezSQL_mysql ile <a href="http://php.net/manual/en/keyword.extends.php" target="_blank">extend</a> ediyoruz.<br />
Flash Builder içinden çağırdığımız kayitEkle fonksiyonu bir adet veri kabul ediyor. Bunu fonksiyon içinde <a href="http://php.net/manual/en/function.extract.php" target="_blank">extract()</a> ile parçalıyoruz. Bu sayede her gelen veri düzgün bir şekilde ayrıştırılmış oluyor.<br />
İşlemleri yapıp geriye istediğimiz veriyi döndürüyoruz.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/flash-builder-amfphp-ezsql-bolum-1-veri-kaydi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ezSQL İle Türkçe Karakter Sorunu Nasıl Aşılır?</title>
		<link>http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html</link>
		<comments>http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html#comments</comments>
		<pubDate>Sat, 24 Jul 2010 11:19:58 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[characterset]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[türkçe karakter sorunu]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=184</guid>
		<description><![CDATA[Merhaba arkadaşlar. Uzun zaman önce tanıştığım ezSQL sayesinde pek çok işimi kolayca hallettim. Sunduğu imkanlar ve wordpress in altyapısını oluşturması benim kullanma isteğimi arttırmıştı. Öncelikle internette küçük bir araştırma yaptım. İngilizceniz varsa kendi dökümantasyonu herşeyi güzelce açıklıyor. Ama eğer türkçe kaynak isterseniz Yakuter'in ve Yakup Gövler'in blog sayfasına  göz atabilirsiniz. http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/ http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2 Ben bunları okuyup irdeleyip kendime uygun bir yapı çıkarttım. Herkesin başına gelmiştir. Php mysql ve türkçe karakter sorunu. Bu ezSQL ile de başıma [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar.</p>
<p>Uzun zaman önce tanıştığım ezSQL sayesinde pek çok işimi kolayca hallettim. Sunduğu imkanlar ve wordpress in altyapısını oluşturması benim kullanma isteğimi arttırmıştı. Öncelikle internette küçük bir araştırma yaptım. İngilizceniz varsa kendi dökümantasyonu herşeyi güzelce açıklıyor. Ama eğer türkçe kaynak isterseniz <a href="http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/" target="_blank">Yakuter</a>'in ve <a href="http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2" target="_blank">Yakup Gövler</a>'in blog sayfasına  göz atabilirsiniz.</p>
<p><a href="http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/">http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/</a></p>
<p><a href="http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2" target="_blank">http://www.yakupgovler.com/ezsql-veritabani-sinifi.html/2</a></p>
<p>Ben bunları okuyup irdeleyip kendime uygun bir yapı çıkarttım. Herkesin başına gelmiştir. Php mysql ve türkçe karakter sorunu. Bu ezSQL ile de başıma geldi. O yüzden internette araştırdım ve şöyle bir sonuca ulaştım.</p>
<p>Öncelikle ezSQL’i buradan indirip içinden <strong>mysql</strong> klasöründeki <strong>ez_sql_mysql.php</strong> ve <strong>shared</strong> klasöründeki <strong>ez_sql_core.php</strong> dosyalarını alıyoruz ve yeni kendi proje dizinimize aktarıyoruz.</p>
<p>Veritabanınızı oluştururken utf8 olarak oluşturun. Veritabanı bağlantısı yaptıktan sonra ise şu kodları yazın.</p>
<div class="igBar"><span id="lphp-37"><a href="#" onclick="javascript:showPlainTxt('php-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-37">
<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;"><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;">"SET NAMES 'utf8'"</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/mysql_query"><span style="color:#000066;">mysql_query</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">"SET CHARACTER SET utf8"</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;"><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;">"SET COLLATION_CONNECTION = 'utf8_turkish_ci'"</span> <span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Bunu ezSQL ile otomatik hale getirmek için sql_for_tr.php isimli bir dosya oluşturup bunları içine yazdım. Burada dikkat edilecek nokta şudur. Dosyaların karakter kodlamaları aynı olmalı. Yani dosya ansi ile kodlanmışsa bütün dosyalar ansi olmalı. Tavsiyem ezSQL ve bu dosya için ansi kullanmanız.</p>
<p>Bunlara ek olarak birde db.php isimli bir dosyam var burada host,kullanıcı adı,şifre ve veritabanı adı gibi bağlantıda gerekli olan bilgileri tutuyorum. Onlarda şu şekildeler:</p>
<div class="igBar"><span id="lphp-38"><a href="#" onclick="javascript:showPlainTxt('php-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-38">
<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;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_HOST'</span>,<span style="color:#FF0000;">'localhost'</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/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_USER'</span>,<span style="color:#FF0000;">'root'</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;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_PASS'</span>,<span style="color:#FF0000;">''</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/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DB_NAME'</span>,<span style="color:#FF0000;">'denemeler'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Şimdi bunları nasıl kullanacağız kısmına gelelim. Yeni bir php dosyası oluşturup aşağıdaki kodları sırasıyla yazalım:</p>
<div class="igBar"><span id="lphp-39"><a href="#" onclick="javascript:showPlainTxt('php-39'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-39">
<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:#616100;">include</span> <span style="color:#FF0000;">'db.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:#616100;">include</span> <span style="color:#FF0000;">'ez_sql_core.php'</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;">include</span> <span style="color:#FF0000;">'ez_sql_mysql.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;">$db</span> = <span style="color:#000000; font-weight:bold;">new</span> ezSQL_mysql <span style="color:#006600; font-weight:bold;">&#40;</span> DB_USER, DB_PASS, DB_NAME, DB_HOST <span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Öncelikle db dosyasını çağırdık. Sonra ezSQL dosyalarını çağırdık. Ve bağlantımızı kurduk. Dikkat ettiyseniz sql_for_tr.php doyasını çağırmadık. Bunu bizim için ezSQL kendisi yaptı. ez_sql_mysql.php dosaysının 131. satırına aşağıdaki kodu ekliyoruz.</p>
<div class="igBar"><span id="lphp-40"><a href="#" onclick="javascript:showPlainTxt('php-40'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-40">
<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:#616100;">include</span> <span style="color:#FF0000;">'sql_for_tr.php'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Bu sınıf içinde bağlantı kurulduktan hemen sonra sql_for_tr. dosyasınındaki kodların çalışmasını sağlıyor.</p>
<p>Böylelikle hem veritabanına türkçe karakter kaydedebileceğiz hem de türkçe karakterleri sayfamızda sorunsuzca gösterebileceğiz. Dikkat edilecek bir diğer husus ise şu sayfamızın karakter kodlamasının utf8 olması karakter setinin utf8 olarak ayarlanması. Bunlarda tamamsa sorunsuzca kodlamaya geçebilirsiniz demektir.</p>
<p>Dosyalara <a href="http://www.ismailsimsek.com/dosya/ezSQL.rar">şuradan</a> erişebilirsiniz.</p>
<p>Sorularınızı sormaktan çekinmeyin. İyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/ezsql-ile-turkce-karakter-sorunu-nasil-asilir.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>jquery ile php den dönen veriyi almak &#8211; kontrol etmek</title>
		<link>http://blog.ismailsimsek.com/php/jquery-ile-php-den-donen-veriyi-almak-kontrol-etmek.html</link>
		<comments>http://blog.ismailsimsek.com/php/jquery-ile-php-den-donen-veriyi-almak-kontrol-etmek.html#comments</comments>
		<pubDate>Fri, 02 Jul 2010 13:37:30 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[eval]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[uploadify]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=169</guid>
		<description><![CDATA[Merhaba arkadaşlar. Makalenin başlığından da anlaşılacağı gibi jquery ile php den dönen veriyi nasıl alabileceğimize değineceğim. Aslında bu makaleyi başıma gelen bir sorunun çözümüne ulaştıktan sonra yazıyorum. Yardımları için Şakir Şensoy ve Göksu Kayış’a teşekkür ederim. Başıma gelen şuydu. Jquery uploadify componenti ile hosta resim yüklüyorum. Eğer işlem başarılı ise 1 değilse 0 aynı resim varsa 2 dönüyor. Tabi bu dönen verilere göre kullanıcıya bir uyarı vermek zorundayım. Bunları kontrol etmek için dönen veriyi if [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar. Makalenin başlığından da anlaşılacağı gibi jquery ile php den dönen veriyi nasıl alabileceğimize değineceğim. Aslında bu makaleyi başıma gelen bir sorunun çözümüne ulaştıktan sonra yazıyorum. Yardımları için Şakir Şensoy ve Göksu Kayış’a teşekkür ederim.<br />
Başıma gelen şuydu. Jquery uploadify componenti ile hosta resim yüklüyorum. Eğer işlem başarılı ise 1 değilse 0 aynı resim varsa 2 dönüyor. Tabi bu dönen verilere göre kullanıcıya bir uyarı vermek zorundayım. Bunları kontrol etmek için dönen veriyi if le kontrol edip alert ile uyarıyı vereceğim. Bu konuda sorun yok. Ama dönen veriyi if ile kontrol edemiyordum. Ne yaptıysam olmadı. Ama verinin döndüğünden eminim :)<br />
Çözüm ise çok basitmiş. (normal bir ajax request i için yazıyorum kodları. Uploadify için bir satır daha ekleyeceğiz.) Yapmanız gereken şey şu. Php tarafında veriyi json şeklinde göndermek. Yani</p>
<div class="igBar"><span id="lphp-44"><a href="#" onclick="javascript:showPlainTxt('php-44'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-44">
<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:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>resimUpload == <span style="color:#000000; font-weight:bold;">TRUE</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:#006600; font-weight:bold;">&#123;</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;">$json</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;">&amp;quot;sonuc&amp;quot; =&amp;gt; “<span style="color:#CC66CC;color:#800000;">1</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;">&amp;quot;mesaj&amp;quot; =&amp;gt; &amp;quot;Yükleme yapıldı.&amp;quot;</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;">&#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;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> json_encode<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$json</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:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>jquery kısmıda şu kodlar var.</p>
<div class="igBar"><span id="ljavascript-45"><a href="#" onclick="javascript:showPlainTxt('javascript-45'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-45">
<div class="javascript">
<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: #003366; font-weight: bold;">function</span> uye_giris<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #66cc66;">&#123;</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;">ajax</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</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; type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span style="color: #3366CC;">'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; dataType&nbsp; &nbsp; &nbsp;: <span style="color: #3366CC;">'json'</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; url&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : upload.<span style="color: #006600;">php</span><span style="color: #3366CC;">',</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: #3366CC;">&nbsp; &nbsp; &nbsp; &nbsp; data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: $('</span>form#resim_sonuc’<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">serialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</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; success&nbsp; &nbsp; &nbsp; : <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>data<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>data.<span style="color: #006600;">giris</span> == “<span style="color: #CC0000;color:#800000;">1</span>”<span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>JSON.<span style="color: #006600;">mesaj</span><span style="color: #66cc66;">&#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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</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: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</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: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</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: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
İşte bu kadar. Bu şekilde dönen veriyi, verileri istediğimiz gibi kullanabiliyoruz. Json sayesinde birden fazla veride döndürebiliyoruz.<br />
Gelelim uploadify ile ilgili olan kısma. Bu component ile dayatype belirleyemiyorum maalesef. Bu durumda dönen verinin json olduğunu ya bizim bildirmemiz lazım yada ona göre bir işlem yapmamız lazım. Dönen veriyi if ile kontrol etmeden önce şunu yazmamız lazım.</p>
<div class="igBar"><span id="ljavascript-46"><a href="#" onclick="javascript:showPlainTxt('javascript-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-46">
<div class="javascript">
<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: #000066; font-weight: bold;">eval</span><span style="color: #66cc66;">&#40;</span>“<span style="color: #003366; font-weight: bold;">var</span> obj =” + data<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
bu şekilde dönen veriyi bir object e atmış olduk. Şimdi aynı şekilde kullanabiliriz. İyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/jquery-ile-php-den-donen-veriyi-almak-kontrol-etmek.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Builder 4 ve Amfphp</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/flash-builder-4-ve-amfphp.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/flash-builder-4-ve-amfphp.html#comments</comments>
		<pubDate>Sun, 11 Apr 2010 15:04:07 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=157</guid>
		<description><![CDATA[Merhaba arkadaşlar. Bu yazımda size geçtiğimiz günlerde çıkan Flash Builder 4 ile AmfPHP ilişkisini anlatacağım. Daha önce Flex Builder ile anlatmıştım aynı konuyu ama şimdi ona bakınca ne kadar çok uğraşmışım diye kendime gülüyorum. Öncelikle basit bir veritabanı yapısı oluşturalım. Veritabanımın adı “denemeler” buraya adı “fb_ilkDeneme” isimli bir tablo oluşturuyoruz. Ve “id,isim,aciklama” alanlarını ekliyoruz. İçerisine birkaç bilgi girelim boş kalmasın. Şimdi gelelim kodlamaya. Öncelikle amfphp yi şu adresten indirip localhostumuzda uygun bir yere çıkartıyoruz. Services [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar. Bu yazımda size geçtiğimiz günlerde çıkan Flash Builder 4 ile AmfPHP ilişkisini anlatacağım. <a href="http://blog.ismailsimsek.com/amfphp/flex-ile-amfphp-kullanmak.html">Daha önce Flex Builder</a> ile anlatmıştım aynı konuyu ama şimdi ona bakınca ne kadar çok uğraşmışım diye kendime gülüyorum.<span id="more-157"></span></p>
<p>Öncelikle basit bir veritabanı yapısı oluşturalım. Veritabanımın adı “denemeler” buraya adı “fb_ilkDeneme” isimli bir tablo oluşturuyoruz. Ve “id,isim,aciklama” alanlarını ekliyoruz. İçerisine birkaç bilgi girelim boş kalmasın.</p>
<p>Şimdi gelelim kodlamaya. Öncelikle amfphp yi <a href="http://www.ismailsimsek.com/projects/amfphp.rar" target="_blank">şu adresten</a> indirip localhostumuzda uygun bir yere çıkartıyoruz. Services klasörü içerisine yeni bir klasör oluşturup adını flashbuilder olarak değiştirelim. Ben öyle yaptım siz adını farklı bir şey yapabilirisiniz. Bunu yapmamızın nedeni her yeni projenin kullandığı amfphp dosyalarının ayrı ayrı klasörlenmesi. Kısaca düzen :)</p>
<p>Sıra geldi database iletişimini sağlayacak olan sınıfımıza. Ben bunun için wordpress inde kullandığı <a href="http://www.woyano.com/jv/ezsql">ezSQL</a>’i kullanmayı tercih ediyorum. <a href="http://www.woyano.com/sites/woyano/data/assets/2/1/3/213-ez_sql_2.05.zip">Şuradan</a> indirebilir <a href="http://www.yakuter.com/ezsql-veritabani-sinifinin-kullanimi/">buradan</a> da yakuter’in ezSQL’i anlattığı yazısına ulaşabilirsiniz. Bu yazıyı okumuş gerekli örnek uygulamaları yapmış ve neyin ne olduğunu bildiğinizi varsayıyorum :) Daha sonra kullanımına yönelik bir makale yazacağım.</p>
<p>Oluşturduğumuz flashbuilder klasörü içine bir adet php sınıfı oluşturmamız lazım. Şimdi kodlamamıza koyulalım. Kodlar aşağıda ve açıklamalarını da hemen altlarına yazdım.</p>
<div class="igBar"><span id="lphp-49"><a href="#" onclick="javascript:showPlainTxt('php-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-49">
<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;">&amp;lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include_once</span> &amp;quot;ez_sql_core.php&amp;quot;;</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;">include_once</span> &amp;quot;ez_sql_mysql.php&amp;quot;;</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;">//Bu sıraya göre include etmemiz gerekiyor yoksa hata verebiliyor.</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:#000000; font-weight:bold;">class</span> deneme extends ezSQL_mysql</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;">&#123;</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:#FF9933; font-style:italic;">//sınıfımızın adı deneme.</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:#FF9933; font-style:italic;">//extends kullandım başka türlü ezSQL içindeki fonksiyonlara ulaşamıyorum</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:#FF9933; font-style:italic;">//bunun dışında yöntem bilen varsa lütfen paylaşsı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; <span style="color:#000000; font-weight:bold;">function</span> deneme<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;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</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:#FF9933; font-style:italic;">//sınıf içinde ilk çalışacak fonksiyon.</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:#FF9933; font-style:italic;">//burada benim kendi değişkenlerimi (kullanıcı adı veritabanı adı vs.) tanımladığım dosyayı çağırıyorum.</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:#616100;">include_once</span> &amp;quot;db.php&amp;quot;;</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:#0000FF;">$this</span>-&amp;amp;gt;ezSQL_mysql <span style="color:#006600; font-weight:bold;">&#40;</span> DB_USER, DB_PASS, DB_NAME, DB_HOST <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; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//son olarakta bağlantı kuruyorum.</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:#006600; font-weight:bold;">&#125;</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;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">function</span> ilkBilgi<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$veri</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;">&#123;</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; <a href="http://www.php.net/extract"><span style="color:#000066;">extract</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$veri</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; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//$veri değişkenine gelen bilgileri dışarı çıkartıp her birini değişken olarak kullanmak için extract fonksiyonunu kullanıyoruz. Bu fonksiyon hakkında daha fazla bilgi için http://php.net/manual/en/function.extract.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;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$bilgi</span> = <span style="color:#0000FF;">$this</span>-&amp;amp;gt;get_row<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;select * from rooms where id=&amp;quot;.<span style="color:#0000FF;">$id</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; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//burada id si 1 olan satırı istedim.</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:#616100;">return</span> <span style="color:#0000FF;">$bilgi</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:#FF9933; font-style:italic;">//ve gelen bilgiyi geri gönderdim. İşte bu kadar.</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>
<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>Burada küçük bir açıklama yapmak istiyorum. $bilgi değişkenine gelen veri şu şekilde.<br />
(Object)#0<br />
id = "1"<br />
isim = "ismail"<br />
aciklama= "ilk aciklama satırı…."</p>
<p>Yani bize gelen veri object formatında. Buda işimizi çok kolaylaştırıyor. İstediğimiz bilgiye $bilgi-&gt;name şeklinde kolayca ulaşabiliyoruz. Bu flash builder içerisinde de işimizi çok kolaylaştıracak.<br />
Şimdi ise actionscript kodlarımıza bakalım. Sahnemizde bir adet buton bir adet textarea nesnemiz var.</p>
<div class="igBar"><span id="lactionscript-50"><a href="#" onclick="javascript:showPlainTxt('actionscript-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-50">
<div class="actionscript">
<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;">&amp;lt;?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=&amp;quot;<span style="color: #cc66cc;color:#800000;">1</span>.<span style="color: #cc66cc;color:#800000;">0</span>&amp;quot; encoding=&amp;quot;utf-<span style="color: #cc66cc;color:#800000;">8</span>&amp;quot;?&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;s:Application xmlns:fx=&amp;quot;http:<span style="color: #808080; font-style: italic;">//ns.adobe.com/mxml/2009&amp;quot;</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; &nbsp; &nbsp;&nbsp; &nbsp; xmlns:s=&amp;quot;library:<span style="color: #808080; font-style: italic;">//ns.adobe.com/flex/spark&amp;quot;</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; &nbsp; &nbsp;&nbsp; &nbsp; xmlns:mx=&amp;quot;library:<span style="color: #808080; font-style: italic;">//ns.adobe.com/flex/mx&amp;quot;&amp;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; &amp;lt;fx:Script&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</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; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> baglantiStr:<span style="color: #0066CC;">String</span>=&amp;quot;http:<span style="color: #808080; font-style: italic;">//localhost/amfphp/gateway.php&amp;quot;;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//hangi yol üzerinden iletişim kurulacak bunu belirttik.</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; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> phpyol:<span style="color: #0066CC;">String</span>=&amp;quot;flashbuilder.<span style="color: #006600;">deneme</span>.&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//bu değişken ise services klasörü içindeki php dosyamızı belirtiyor. En sonunda bir nokta daha var. Burada oluşturduğumuz klasör içindeki fonksiyonlara ulaşmak için şu yazımı kullanıyoruz. “Flashbuilder.deneme.ilkBilgi” bu şekilde o fonksiyona ulaşıyoruz. Ama bana her seferinde “flashbuilder.deneme” yazmak zor geliyor açıkcası o yüzden böyle değişkene bağladım. </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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> amfphp<span style="color: #66cc66;">&#40;</span>yol:<span style="color: #0066CC;">String</span>, veriler:<span style="color: #0066CC;">Object</span>, callback:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</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; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> baglanti:<span style="color: #0066CC;">NetConnection</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">NetConnection</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; baglanti.<span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#40;</span>baglantiStr<span style="color: #66cc66;">&#41;</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; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> geri:Responder=<span style="color: #000000; font-weight: bold;">new</span> Responder<span style="color: #66cc66;">&#40;</span>callback<span style="color: #66cc66;">&#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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; baglanti.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>phpyol + yol, geri, veriler<span style="color: #66cc66;">&#41;</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; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> verileriGetirFnk<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</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; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> veri:<span style="color: #0066CC;">Object</span>=<span style="color: #66cc66;">&#123;</span>id: <span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#125;</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; &nbsp; &nbsp; &nbsp; &nbsp; amfphp<span style="color: #66cc66;">&#40;</span>&amp;quot;ilkBilgi&amp;quot;, veri, getir<span style="color: #66cc66;">&#41;</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; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getir<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</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; &nbsp; &nbsp; &nbsp; &nbsp; yaziAlani.<span style="color: #0066CC;">text</span>=<span style="color: #0066CC;">e</span>.<span style="color: #006600;">aciklama</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; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</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: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>&amp;gt;</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; &amp;lt;/fx:Script&amp;gt;</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;">&nbsp; &nbsp; &amp;lt;s:TextArea x=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;y=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;</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;&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">width</span>=&amp;quot;<span style="color: #cc66cc;color:#800000;">497</span>&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">height</span>=&amp;quot;<span style="color: #cc66cc;color:#800000;">224</span>&amp;quot;</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;&nbsp; &nbsp; &nbsp;id=&amp;quot;yaziAlani&amp;quot;/&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &amp;lt;s:<span style="color: #0066CC;">Button</span> x=&amp;quot;<span style="color: #cc66cc;color:#800000;">515</span>&amp;quot;</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; &nbsp; &nbsp; &nbsp; &nbsp;y=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;label=&amp;quot;Verileri Getir&amp;quot;</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;&nbsp; &nbsp;click=&amp;quot;verileriGetirFnk<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>&amp;quot;/&amp;gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;/s:Application&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>amfphp() fonksiyonu üç adet değişken kabul ediyor. Bunlar yol veriler ve callback. Yol değişkeni verilerimizi hangi fonksiyona göndereceğimizi belirtiyor. Veriler ise fonksiyona göndereceğimiz verileri taşıyor ve object formatında. Bu sayede php tarafında extract() ile içerisini boşaltabiliyoruz. Callback ise php den dönen verileri alıp işleyen fonksiyon. Daha sonra buraya baglanti isminde bir NetConnection nesnesi tanımlıyoruz. Bu baglanti nesnemiz ile baglantiStr de belirttiğimiz adrese bağlantıyı gerçekleştiriyoruz. Daha sonra bir Responder oluşturup callback i buraya atıyoruz. Burada dikkat edilecek nokta şu: iki farklı responder var. Biz flash.net sınıfına bağlı olanı seçiyoruz.</p>
<p><img class="alignnone" src="http://www.ismailsimsek.com/ie/flashbuilder_amfphp/1.jpg" alt="" width="477" height="244" /></p>
<p>Daha sonra bu baglanti üzerinden call() fonksiyonu ile verilerimizi gönderiyoruz. Fark ettiyseniz phpyol ile fonksiyon ismini taşıyan yol değişkenimi birleştirdim. Böylelikle daha önce yazdığım şekil ortaya çıktı. “flashbuilder.deneme.ilkBilgi”</p>
<p>verileriGetirFnk Mouse tarafından tetiklenen fonksiyonumuz. Burada veri isminde bir obje oluşturup içine göndereceğimiz veriyi düzgün şekilde yazıyoruz. Daha sonra bunu amfphp ye gönderiyoruz. Burada “ilkBilgi” php dosyasındaki fonksiyon adını veri oluşturduğumuz veri değişkenini getir ise php den dönen verilerin işleneceği fonksiyon adını belirtiyor.</p>
<p>getir fonksiyonda ise dönen verimizi istediğimiz şekilde kullanabiliriz. Çünkü buraya gelen veri object şeklinde zaten. Kullanımı çok basit. Textarea ya yazdıracağımız veriyi e.aciklama şeklinde tanımlıyoruz. Hepsi bu kadar. Veritabanından veriyi çektik ve yazdırdık.</p>
<p>Veritabanına veri kaydı için ise kaydedeceğimiz verileri gönderiyoruz php ile kayıt işlemini yapıyoruz. Bu kadar basit. Diğerinden daha kolay değil mi?</p>
<p>Herkese iyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/flash-builder-4-ve-amfphp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

