<?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; Amfphp</title>
	<atom:link href="http://blog.ismailsimsek.com/tag/amfphp/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>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-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#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-5"><a href="#" onclick="javascript:showPlainTxt('xml-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-5">
<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-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#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>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-10"><a href="#" onclick="javascript:showPlainTxt('actionscript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-10">
<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-11"><a href="#" onclick="javascript:showPlainTxt('php-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-11">
<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-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;">//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>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-16"><a href="#" onclick="javascript:showPlainTxt('html-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-16">
<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-17"><a href="#" onclick="javascript:showPlainTxt('actionscript-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-17">
<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-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;">&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>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-21"><a href="#" onclick="javascript:showPlainTxt('php-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-21">
<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-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;">&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>
		<item>
		<title>Amfphp 500 Internal Server Error Hatası Çözümü</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/amfphp-500-internal-server-error-hatasi-cozumu.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/amfphp-500-internal-server-error-hatasi-cozumu.html#comments</comments>
		<pubDate>Wed, 13 Jan 2010 12:29:35 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[cross-domain policy]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=135</guid>
		<description><![CDATA[Bugün karşılaştığım bu sinir bozucu hatanın çözümünü okuyacaksınız bu makalede. Tek yapmanız gereken amfphp dosyasının içindeki .htaccess dosyasının adını dğeiştirmek yada silmek. .htaccess dosyası bu probleme neden oluyor. Peki güvenlik ne olacak dediğinizi duyar gibiyim. Amfphp güvenliği cross-domain policy ile sağlıyor. Dolayısıyla bunu da dert etmenize gerek yok. Kolay gelsin.]]></description>
			<content:encoded><![CDATA[<p>Bugün karşılaştığım bu sinir bozucu hatanın çözümünü okuyacaksınız bu makalede.</p>
<p>Tek yapmanız gereken amfphp dosyasının içindeki .htaccess dosyasının adını dğeiştirmek yada silmek. .htaccess dosyası bu probleme neden oluyor. Peki güvenlik ne olacak dediğinizi duyar gibiyim. Amfphp güvenliği cross-domain policy ile sağlıyor. Dolayısıyla bunu da dert etmenize gerek yok. Kolay gelsin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/amfphp-500-internal-server-error-hatasi-cozumu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>amfphp 1.9 beta utf-8 sorunu ve çözümü</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/amfphp-1-9-bet-utf-8-sorunu-ve-cozumu.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/amfphp-1-9-bet-utf-8-sorunu-ve-cozumu.html#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:02:19 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[iso-8859-1]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=127</guid>
		<description><![CDATA[Merhaba arkadaşlar. Bugün amfphp ile çalışmış olan herkesin karşılaştığı ya da karşılaşacağı bir sorunu dile getireceğim ve çözümünü paylaşacağım. Amfphp ile çektiğimiz ya da kaydettiğimiz veriler düzgün görüntülenemeyebilir. Ya da utf-8 ile kodlanmış dosyalarınız çalışmayacaktır. Bunun nedeni amfphp nin utf-8 için ayarlanmamış olmasıdır. O zaman bizde bu ayarı elimizle yapalım. Amfphp nin ana dizinindeki gateway.php dosyasını açalım ve aşağıdaki satırı PLAIN TEXT PHP: $gateway-&#38;amp;gt;setCharsetHandler&#40;&#38;quot;utf8_decode&#38;quot;, &#38;quot;ISO-8859-1&#38;quot;, &#38;quot;ISO-8859-1&#38;quot;&#41;; bu satır ile değiştirelim. PLAIN TEXT PHP: $gateway-&#38;amp;gt;setCharsetHandler&#40;&#38;quot;utf8_decode&#38;quot;, &#38;quot;utf-8&#38;quot;, &#38;quot;utf-8&#38;quot;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar. Bugün amfphp ile çalışmış olan herkesin karşılaştığı ya da karşılaşacağı bir sorunu dile getireceğim ve çözümünü paylaşacağım. Amfphp ile çektiğimiz ya da kaydettiğimiz veriler düzgün görüntülenemeyebilir. Ya da utf-8 ile kodlanmış dosyalarınız çalışmayacaktır. Bunun nedeni amfphp nin utf-8 için ayarlanmamış olmasıdır. <span id="more-127"></span>O zaman bizde bu ayarı elimizle yapalım. Amfphp nin ana dizinindeki gateway.php dosyasını açalım ve aşağıdaki satırı</p>
<div class="igBar"><span id="lphp-25"><a href="#" onclick="javascript:showPlainTxt('php-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-25">
<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;">$gateway</span>-&amp;amp;gt;setCharsetHandler<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;utf8_decode&amp;quot;, &amp;quot;ISO-<span style="color:#CC66CC;color:#800000;">8859</span>-<span style="color:#CC66CC;color:#800000;">1</span>&amp;quot;, &amp;quot;ISO-<span style="color:#CC66CC;color:#800000;">8859</span>-<span style="color:#CC66CC;color:#800000;">1</span>&amp;quot;<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
bu satır ile değiştirelim.</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;">$gateway</span>-&amp;amp;gt;setCharsetHandler<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;utf8_decode&amp;quot;, &amp;quot;utf-<span style="color:#CC66CC;color:#800000;">8</span>&amp;quot;, &amp;quot;utf-<span style="color:#CC66CC;color:#800000;">8</span>&amp;quot;<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Bu şekilde utf-8 sorununu çözmüş bulunuyoruz. Kolay gelsin...</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/amfphp-1-9-bet-utf-8-sorunu-ve-cozumu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php 5.3.0 ve amfphp 1.9 beta</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/php-5-3-0-ve-amfphp-1-9-beta.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/php-5-3-0-ve-amfphp-1-9-beta.html#comments</comments>
		<pubDate>Wed, 07 Oct 2009 20:02:26 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[amfphp error]]></category>
		<category><![CDATA[eregi_replace]]></category>
		<category><![CDATA[Function deprecated]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[php 5.3.0]]></category>
		<category><![CDATA[preg_replace]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=126</guid>
		<description><![CDATA[Merhabalar. Bugün karşılaştığım bir sorun üzerine bu yazıyı yazmaya karar verdim. Yaptığım küçük araştırma sonucunda bir çözüm buldum ve sizlerle paylaşmak istedim. Xampp ın son sürümünü ve amfphp yi kullanmak istiyorsanız eğer büyük ihtimalle alacağınız ilk hata şu olacaktır. Error retrieving service info: Function eregi_replace() is deprecated C:\xampp\htdocs\amfphp\core\shared\util\MethodTable.php on line 505 Bu amfphp nin php5.3.0 e uyumlu olmamasından kaynaklanıyor. Bunu aşmanın iki yolu var. Yöntem 1: php.ini dosyanızı bir text editörde açarak  "error_reporting = E_ALL" [...]]]></description>
			<content:encoded><![CDATA[<p>Merhabalar. Bugün karşılaştığım bir sorun üzerine bu yazıyı yazmaya karar verdim. Yaptığım küçük araştırma sonucunda bir çözüm buldum ve sizlerle paylaşmak istedim.<span id="more-126"></span> Xampp ın son sürümünü ve amfphp yi kullanmak istiyorsanız eğer büyük ihtimalle alacağınız ilk hata şu olacaktır.</p>
<p>Error retrieving service info:</p>
<p>Function eregi_replace() is deprecated<br />
C:\xampp\htdocs\amfphp\core\shared\util\MethodTable.php on line 505</p>
<p>Bu amfphp nin php5.3.0 e uyumlu olmamasından kaynaklanıyor. Bunu aşmanın iki yolu var.</p>
<p>Yöntem 1:</p>
<p>php.ini dosyanızı bir text editörde açarak  "<em>error_reporting = E_ALL</em>" kısmını <em>"error_reporting = E_ALL &amp; ~E_NOTICE" şeklinde değiştirmeniz. Serverinizi yeniden başlattığınızda sorun ortadan kalkacaktır. Ama bunu tavsiye etmiyorum. :)</em></p>
<p><em>Yöntem 2:</em></p>
<p><em>Bu yöntemde </em>C:\xampp\htdocs\amfphp\core\shared\util\MethodTable.php dosyasını açıp aşağıdaki şekilde değiştirmek.</p>
<p>505-506-507. satırları yani;</p>
<div class="igBar"><span id="lphp-29"><a href="#" onclick="javascript:showPlainTxt('php-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-29">
<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;">$comment</span> = <a href="http://www.php.net/preg_replace"><span style="color:#000066;">preg_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;\n<span style="color:#006600; font-weight:bold;">&#91;</span> \t<span style="color:#006600; font-weight:bold;">&#93;</span>+&amp;quot;, &amp;quot;\n&amp;quot;, <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$comment</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$comment</span> = <a href="http://www.php.net/str_replace"><span style="color:#000066;">str_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;\n&amp;quot;, &amp;quot;\\n&amp;quot;, <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$comment</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$comment</span> = <a href="http://www.php.net/preg_replace"><span style="color:#000066;">preg_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;<span style="color:#006600; font-weight:bold;">&#91;</span>\t <span style="color:#006600; font-weight:bold;">&#93;</span>+&amp;quot;, &amp;quot; &amp;quot;, <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$comment</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
aşağıdakilerle değiştirmek.</p>
<div class="igBar"><span id="lphp-30"><a href="#" onclick="javascript:showPlainTxt('php-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-30">
<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;">$comment</span> = <a href="http://www.php.net/preg_replace"><span style="color:#000066;">preg_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;<span style="color:#FF0000;">'<span style="color:#000099; font-weight:bold;">\n</span>[ <span style="color:#000099; font-weight:bold;">\t</span>]+'</span>U&amp;quot;, &amp;quot;\n&amp;quot;,<a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$comment</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$comment</span> = <a href="http://www.php.net/str_replace"><span style="color:#000066;">str_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;\n&amp;quot;, &amp;quot;\\n&amp;quot;, <a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$comment</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$comment</span> = <a href="http://www.php.net/preg_replace"><span style="color:#000066;">preg_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;<span style="color:#FF0000;">'[<span style="color:#000099; font-weight:bold;">\t</span> ]+'</span>U&amp;quot;, &amp;quot; &amp;quot;,<a href="http://www.php.net/trim"><span style="color:#000066;">trim</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$comment</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Yukarıdaki yollarla çözüme ulaşabilirsiniz. Kolay gelsin...</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/php-5-3-0-ve-amfphp-1-9-beta.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex ile amfphp kullanmak</title>
		<link>http://blog.ismailsimsek.com/php/amfphp/flex-ile-amfphp-kullanmak.html</link>
		<comments>http://blog.ismailsimsek.com/php/amfphp/flex-ile-amfphp-kullanmak.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:30:28 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Amfphp]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[amfphp configuration]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[flex veri alış-verişi]]></category>
		<category><![CDATA[remoteobject]]></category>
		<category><![CDATA[services-config]]></category>

		<guid isPermaLink="false">http://www.webtimi.com/ismail/blog/?p=95</guid>
		<description><![CDATA[Flex içinden veritabanına erişebilmek veritabanında işlem yapabilmek için server tarafında çalışacak olan bir yazılım diline ihtiyacımız var. Ben php kullanıyorum. Tabiki yakında asp de lazım olacak farklı işler için onu da öğrenmek lazım. Flash, flex için doğan bu ihtiyaçtan ötürü amfphp geliştirilmiş. Bu ara script ile veriler 10 kat daha hızlı iletiliyor ve alınıyor. (tabi bu hız sizin sql sorqularınıza göre değişiklik gösterecektir.) tek yapmanız gereken php dosyanızı sınıf şeklinde hazırlamak. Başka türlü bir verim [...]]]></description>
			<content:encoded><![CDATA[<p>Flex içinden veritabanına erişebilmek veritabanında işlem yapabilmek için server tarafında çalışacak olan bir yazılım diline ihtiyacımız var. Ben php kullanıyorum. Tabiki yakında asp de lazım olacak farklı işler için onu da öğrenmek lazım.</p>
<p>Flash, flex için doğan bu ihtiyaçtan ötürü <a title="Amfphp Home Page" href="http://www.amfphp.org/" target="_blank">amfphp</a> geliştirilmiş. Bu ara script ile veriler 10 kat daha hızlı iletiliyor ve alınıyor. (tabi bu hız sizin sql sorqularınıza göre değişiklik gösterecektir.) tek yapmanız gereken php dosyanızı sınıf şeklinde hazırlamak. Başka türlü bir verim alamazsınız amfphp den.<span id="more-95"></span></p>
<p>Öncelikle <a title="Amfphp indir" href="http://sourceforge.net/projects/amfphp/files/amfphp/amfphp%201.9%20beta2/amfphp-1.9.beta.20080120.zip/download" target="_blank">şu adresteki</a> amfphp dosyamızı bilgisayarımıza indirip localhostta uygun bir yere çıkartıyoruz. Daha sonra çıkarttığımız dosyaya şu adres ile ulaşıp (127.0.0.1 yerine localhost yazarsanız da sonuç değişmez bu benim tercihim :))“http://127.0.0.1/cikartiginiz_dosyanin_adi/browser/” tarayıcımızla ulaşıp karşımıza gelen ekranda hiçbir şeye dokunmadan “Save” diyoruz. (ben amfphp isimli bir dosyaya çıkarttım).</p>
<p><img class="alignnone size-full wp-image-96" title="1" src="/wp-content/uploads/2009/08/1.jpg" alt="1" width="537" height="362" /></p>
<p>Artık kullanıma hazır. Soldaki menüden hazırladığımız sınıflara ulaşabilir arayüz üzerinden direkt olarak bu sınıflara erişebilir hatta kullanabilir sonuçlarını görebiliriz.</p>
<p>Peki php de nasıl sınıf yazacağız. Aslında çok basit. Ben sadece basitçe göstereceğim. Siz sonra geliştirisiniz. Sınıf dosyalarımızı services isimli klasörde saklamamız gerekiyor.  küçük birkaç not eğer sınıf içinde sınıfımızla aynı ismi taşıyan bir fonksiyonumuz varsa bu otomatik olarak yapılandırıcı fonksiyon olarak atanır ve ilk olarak bu fonksiyon çalışır. Örneğin veritabanı gerektiren uygulamalarınızda veritabanı bağlantılarınızı bu fonksiyon içine tanımlayabilirsiniz.</p>
<div class="igBar"><span id="lphp-34"><a href="#" onclick="javascript:showPlainTxt('php-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-34">
<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> deneme1 <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> ilkdeneme<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$veri</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> &amp;quot;Gönderdiğiniz&nbsp; veri -&amp;gt; &amp;quot; . <span style="color:#0000FF;">$veri</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>
Bu şekilde ilk sınıfımızı oluşturduk. Browser panelimizi refresh ettiğimizde karşımıza sınıfımız gelecektir.<br />
Gördüğünüz gibi sınıfımız karşımızda ve direk kullanıma hazır.</p>
<p><img class="alignnone size-full wp-image-97" title="2" src="/wp-content/uploads/2009/08/2.jpg" alt="2" width="569" height="401" /></p>
<p>Ekrandaki text alanına herhangi bir şey yazıp call diyerek test edebiliriz.</p>
<p>Gelelim Flex tarafına.<br />
Öncelikle yeni bir flex Project oluşturup src dizinine bu adresten indireceğiniz xml dosyasını koyuyoruz. Bu dosya flex in amfphp ile iletişiminde hayati rol oynuyor bizim için. Burada dikkat etmemiz gerekn nokta şu dosya içerisinde bir yeri amfphp yi attığımız yere göre kendimiz düzeltmeliyiz (benim dosyamı indirdiğiniz için benim dosyanın yolu yazıyor.)<br />
<span style="color: #ff0000;"><strong>&lt;endpoint uri=”http://127.0.0.1/sizin_amfphp_icerigini_cikarttiginiz_klasor_ismi/gatewat.php”/&gt;</strong></span></p>
<p>Aşağıdaki örnek görüntüde daha iyi göreceksiniz değiştirmeniz gereken yeri.</p>
<p><img class="alignnone size-full wp-image-98" title="3" src="/wp-content/uploads/2009/08/3.jpg" alt="3" width="713" height="284" /></p>
<p>Daha sonra flex navigatörden oluşturduğumuz projeye sağ tıklayıp “Properties” i seçiyoruz.</p>
<p><img class="alignnone size-full wp-image-99" title="4" src="/blog/wp-content/uploads/2009/08/4.jpg" alt="4" width="303" height="493" /></p>
<p>Buradan “Flex Compiler” seçeneğine tıklayarak karşımıza gelen text alanına şunları ekliyoruz. Parantezler içindeki bölüm (evet en başta boşluk var)</p>
<p>( -services "services-config.xml") son olarak görüntü aşağıdaki gibi olmalı.</p>
<p><img class="alignnone size-full wp-image-100" title="5" src="/wp-content/uploads/2009/08/5.jpg" alt="5" width="625" height="536" /></p>
<p>Bu kısmıda Apply ve OK diyerek geçtikten sonra artık kodlamaya geçebiliriz. Çok karışık değil bunları bi kere yapacağız gerisi sınıf dosyasını ve flex uygulamamızı geliştirdikçe gelişecek…ayrıca bunları bir kere yapınca kopyala yapıştır ile diğer projelerinizede aktarabilirsiniz ben öyle yapıyorum J</p>
<p>Öncelikle çalışma alanımıza bir adet TextInput, bir adet Button ve bir adet label yerleştiriyoruz. textInput’a id olarak “gonderilenVeri“ yazıyoruz. Butona da “gonder” id sini verelim.. Butona tıklandığında “veriGonder” fonksiyonunu çalıştırmasını söyleyelim.  Ve uygulamamıza amfphp yi remoteobject olarak ekliyelim. Bu durumda</p>
<p>Sonuç olarak:</p>
<div class="igBar"><span id="lactionscript-35"><a href="#" onclick="javascript:showPlainTxt('actionscript-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-35">
<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;mx:Application xmlns:mx=&amp;quot;http:<span style="color: #808080; font-style: italic;">//www.adobe.com/2006/mxml&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; layout=&amp;quot;absolute&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;mx:Script&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; &nbsp; &nbsp; &amp;lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</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: #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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FaultEvent</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: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ResultEvent</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;">private</span> <span style="color: #000000; font-weight: bold;">function</span> veriGonder<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<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: #808080; font-style: italic;">//yapılacak&nbsp; işlemler.</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; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> ilkDenemeSonuc<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:ResultEvent<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: #808080; font-style: italic;">//yapılacak&nbsp; işlemler.</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;</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;">function</span> hata<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:FaultEvent<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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//hata döndüren handler....</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; Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>&amp;quot;Hata&nbsp; Kodu:\n&amp;quot; + <span style="color: #0066CC;">e</span>.<span style="color: #006600;">fault</span>.<span style="color: #006600;">faultCode</span> + &amp;quot;\n\n&amp;quot; + &amp;quot;Hata&nbsp; Mesajı:\n&amp;quot; + <span style="color: #0066CC;">e</span>.<span style="color: #006600;">fault</span>.<span style="color: #006600;">faultString</span> + &amp;quot;\n\nHata Detayı:\n&amp;quot; + <span style="color: #0066CC;">e</span>.<span style="color: #006600;">fault</span>.<span style="color: #006600;">faultDetail</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; <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;/mx: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; &amp;lt;mx:RemoteObject id=&amp;quot;amf&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; &nbsp; &nbsp;&nbsp; fault=&amp;quot;hata<span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</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; &nbsp; &nbsp; &nbsp;&nbsp; showBusyCursor=&amp;quot;true&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; &nbsp; &nbsp;&nbsp; source=&amp;quot;deneme1&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; &nbsp; &nbsp; &nbsp;&nbsp; destination=&amp;quot;amfphp&amp;quot;&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; &nbsp; &nbsp; &amp;lt;mx:method <span style="color: #0066CC;">name</span>=&amp;quot;ilkdeneme&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; &nbsp;&nbsp; &nbsp; result=&amp;quot;ilkDenemeSonuc<span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>&amp;quot;/&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;/mx:RemoteObject&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;mx:TextInput id=&amp;quot;gonderilenVeri&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;&nbsp; &nbsp;x=&amp;quot;<span style="color: #cc66cc;color:#800000;">120</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; &nbsp;&nbsp; &nbsp;y=&amp;quot;<span style="color: #cc66cc;color:#800000;">10</span>&amp;quot;/&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;mx:<span style="color: #0066CC;">Button</span> id=&amp;quot;gonder&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; &nbsp; x=&amp;quot;<span style="color: #cc66cc;color:#800000;">167</span>.<span style="color: #cc66cc;color:#800000;">5</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;">40</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; &nbsp; label=&amp;quot;Gönder&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; click=&amp;quot;veriGonder<span style="color: #66cc66;">&#40;</span>event<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;/mx:Application&amp;gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Burada RemoteObject kısmını açıklayacak olursak; id ile RemoteObject nesnemize bir id veriyoruz daha sonra bu isim ile ulaşacağız kendisine. fault ile gönderim ya da alım sırasında bir hata oluştuğunda tetiklenecek olan fonksiyonu belirledik. Burada hata fonksiyonu hata kodunu hata mesajını ve deyaını bize alert olarak gösterecektir. showBusyCursor ile veri alışverişi sırasında flexe özgü bekleme cursor unun gösterilmesini sağlıyoruz. Source ise amfphp deki sınıf dosyamızın adı. Destination ise amfphp dosyamızın bulunduğu hedef klasör benim bilgisayarımda bu klasörün adı amfphp. Sınıf içerisinde tanımladığımız fonksiyonlara erişmek için RemoteObject nesnesi tagları arasına method taglarını yazıyoruz. Burada ilkdeneme methodumun adını (Dikkat: aynı zamanda php deki fonksiyon ismi)result ise bu method dan dönen sonuçların hangi fonksiyona aktarılacağını gösteriyor.</p>
<p>Burada dikkat edeceğimiz ikinci nokta şu: tanımladığımız fonksiyonlara gelen verilerin türleri. Hata fonksiyonunda FaultEvent tetiklenir.  ilkDenemeSonuc fonksiyonunda ResultEvent tetiklenir.<br />
Şimdi de veriGonder fonksiyonumuza kodlarımızı yazalım.</p>
<p>amf.getOperation(<strong>"ilkdeneme"</strong>).send(gonderilenVeri.text);</p>
<p>Burada yaptığımız şey şu: ilk deneme isimli methoda gonderilenVeri deki veriyi gönderdik. Hangi methoda veri göndereceksek bu şekilde verimizi gönderebiliriz.  İstediğimiz kadar veri gönderebiliriz. Sadece aralarına virgül koymamız yeterli. Tabi php tarafında da bu verileri karşılamamız lazım ki sonra sen 3 gönderdim ama bu tarafta 1 bekleniyordu hataları almayasınız.<br />
Dönen veriyi ekranda göstermek için ilkDenemeSonuc fonksiyonuna şu kodları yazıyoruz:</p>
<p>Alert.show(e.message.body.toString(),"Dönen Veri");</p>
<p>Yani e ye dönen mesajın gövdesindeki değeri stringe çevir ve alert ile göster dedik. Fonksiyonlarımızın son halleri şu şekilde oldu:</p>
<div class="igBar"><span id="lactionscript-36"><a href="#" onclick="javascript:showPlainTxt('actionscript-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-36">
<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;">private</span> <span style="color: #000000; font-weight: bold;">function</span> veriGonder<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<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;">&nbsp; &nbsp; amf.<span style="color: #006600;">getOperation</span><span style="color: #66cc66;">&#40;</span>&amp;quot;ilkdeneme&amp;quot;<span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span>gonderilenVeri.<span style="color: #0066CC;">text</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;">&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;">private</span> <span style="color: #000000; font-weight: bold;">function</span> ilkDenemeSonuc<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:ResultEvent<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; Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">message</span>.<span style="color: #006600;">body</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, &amp;quot;Dönen&nbsp; Veri&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;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Artık çalıştırabiliriz. Burada güzel olan şu dosyanızın uzantısı html olarak kalıyor dosyanızı localhost içersine aymanıza gerek yok çift tıklayarak çalıştırdığınızda o kendi dosyayı bulacaktır artık. Service-config.xml dosyası bu işe yarıyor. Sonucu hep birlikte görelim:</p>
<p><img class="alignnone size-full wp-image-101" title="6" src="/wp-content/uploads/2009/08/6.jpg" alt="6" width="434" height="248" /></p>
<p>Evet sonuc başarılı. İlk veri alış verişini gerçekleştirdik. Bu olayı geliştirmek size kalıyor. Sorularınızı bana iletebilirsiniz. Aşağıdaki linkten uygulamanın dosyalarına erişebilirsiniz. (uygulama zip halinde bunu flex içersine import etmeniz gerekiyor. nasıl yaparım diyorsanız buyurun sizi şöyle alalım.)</p>
<p><a href="../../amfphpinflex.rar" target="_blank">Buradan indirelim...</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/amfphp/flex-ile-amfphp-kullanmak.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

