<?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>Serpito &#187; PHP</title>
	<atom:link href="http://www.serpito.com/etiket/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serpito.com</link>
	<description>Güncel Teknoloji ve Yazılım Blogu</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:44:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sign in with Twitter OAuth &#8211; Twitter ile bağlantı</title>
		<link>http://www.serpito.com/sign-in-with-twitter-oauth-twitter-ile-baglanmak/</link>
		<comments>http://www.serpito.com/sign-in-with-twitter-oauth-twitter-ile-baglanmak/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 11:53:48 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[php uygulamaları]]></category>
		<category><![CDATA[sign in with twitter]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitter Application]]></category>
		<category><![CDATA[Twitter Callback URL]]></category>
		<category><![CDATA[twitter connection]]></category>
		<category><![CDATA[Twitter login]]></category>
		<category><![CDATA[Twitter OAuth]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1467</guid>
		<description><![CDATA[Sosyal medyanın verdiği en büyük imkanlardan birisi de globalleşme.  OAuth metodu ile artık Twitter üyelerinin , web sayfanıza kolayca üye olması ve giriş yapması mümkün. OAuth hakkında detaylı bilgi için  Via. Twitter OAuth sistemi ile websitenize üye alabilir ve üyelerinize hızlı oturum açma imkanı verebilirsiniz. Bu yazıda basit bir Twitter uygulaması yardımıyla,  kullanıcının Twitter&#8217;den  bilgilerine <a href="http://www.serpito.com/sign-in-with-twitter-oauth-twitter-ile-baglanmak/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1474" title="php-twitter" src="http://www.serpito.com/wp-content/uploads/php-twitter-300x139.jpg" alt="" width="300" height="139" />Sosyal medyanın verdiği en büyük imkanlardan birisi de globalleşme.  OAuth metodu ile artık Twitter üyelerinin , web sayfanıza kolayca üye olması ve giriş yapması mümkün. OAuth hakkında detaylı bilgi için  <a title="OAuth" href="http://en.wikipedia.org/wiki/OAuth" target="_blank">Via</a>.</p>
<p><a title="Twitter OAuth" href="https://twitter.com/oauth_clients/" target="_blank">Twitter OAuth</a> sistemi ile websitenize üye alabilir ve üyelerinize hızlı oturum açma imkanı verebilirsiniz. Bu yazıda basit bir Twitter uygulaması yardımıyla,  kullanıcının Twitter&#8217;den  bilgilerine erişim sağlayacağız.</p>
<p>Öncelikle <a title="Twitter Developer Center" href="https://dev.twitter.com/user/login?destination=home" target="_blank">Twitter Developer</a> sistemine giriş yapmış olmanız gerekiyor. Sisteme giriş yaptıktan sonra <a title="Twitter OAuth" href="https://dev.twitter.com/apps" target="_blank">My Applications</a> ekranından <a title="Twitter OAuth Application" href="https://dev.twitter.com/apps/new" target="_blank">Create New application </a>bağlantısını tıklayın.</p>
<p><a href="http://www.serpito.com/wp-content/uploads/19.jpg"><img class="aligncenter size-full wp-image-1470" title="Twitter Developer Application" src="http://www.serpito.com/wp-content/uploads/19.jpg" alt="" width="580" height="148" /></a></p>
<h3>1. Adım  -  Uygulama Oluştur</h3>
<p><a title="Create an application" href="https://dev.twitter.com/apps/new" target="_blank">https://dev.twitter.com/apps/new</a>   linkini tıklayarak Uygulama kayıt sayfasını açın.</p>
<p>Aşağıdaki resimde açıkladığım gibi istenen alanlarını  kendi website bilgilerinizle doldurunuz.</p>
<p><a href="http://www.serpito.com/wp-content/uploads/2-register-app.jpg"><img class="aligncenter size-full wp-image-1471" title="Create applition on twitter" src="http://www.serpito.com/wp-content/uploads/2-register-app.jpg" alt="" width="580" height="406" /></a></p>
<p>&nbsp;</p>
<p>Formun altındaki kullanım koşulları ve CAPTCHA kontrolünü de onaylayıp kayıt edin. Kayıt işleminden sonra OAuth Ayarları için gerekli olan &#8220;Consumer key&#8221; ve &#8220;Consumer secret&#8221; şifrelerini alabilirsiniz.</p>
<p><a href="http://www.serpito.com/wp-content/uploads/3-oauth-settings.jpg"><img class="aligncenter size-full wp-image-1472" title="OAuth Settings" src="http://www.serpito.com/wp-content/uploads/3-oauth-settings.jpg" alt="" width="585" height="220" /></a></p>
<p>&nbsp;</p>
<h3>2. Adım -  Twitter OAuth Library</h3>
<p>Projenin lib dizininde yer alan <strong>secret.php</strong> dosyasını açarak,  1. adımda aldığımız <strong>Consumer key</strong> ve <strong>Consumer secret</strong> değerlerini güncelliyoruz.</p>
<p><a href="http://www.serpito.com/wp-content/uploads/libfiles.jpg"><img class="aligncenter size-full wp-image-1473" title="Twitter OAuth lib files" src="http://www.serpito.com/wp-content/uploads/libfiles.jpg" alt="" width="341" height="195" /></a><span id="more-1467"></span></p>
<h3>3. Adım- login.php oluşturalım</h3>
<p>OAuth işlemleri için gerekli olan library ( /lib dizini) dosyaları login.php dosyasında require edilmelidir.</p>
<pre class="brush: php; ">

&lt;?php
ob_start();
session_start();

include &#039;lib/EpiCurl.php&#039;;
include &#039;lib/EpiOAuth.php&#039;;
include &#039;lib/EpiTwitter.php&#039;;
include &#039;lib/secret.php&#039;;

$twitterObj = new EpiTwitter($consumer_key, $consumer_secret);
$oauth_token = $_GET[&#039;oauth_token&#039;];

if($oauth_token == &#039;&#039;)
{
$url = $twitterObj-&gt;getAuthorizationUrl();
header(&quot;Location: &quot;.$url);
}
else
{
$twitterObj-&gt;setToken($_GET[&#039;oauth_token&#039;]);
$token = $twitterObj-&gt;getAccessToken();
$twitterObj-&gt;setToken($token-&gt;oauth_token, $token-&gt;oauth_token_secret);
$_SESSION[&#039;ot&#039;] = $token-&gt;oauth_token;

$_SESSION[&#039;ots&#039;] = $token-&gt;oauth_token_secret;
$twitterInfo= $twitterObj-&gt;get_accountVerify_credentials();
$isim= $twitterInfo-&gt;name;
$username=$twitterInfo-&gt;screen_name;
$profilepic = $twitterInfo-&gt;profile_image_url;
$twid= $twitterInfo-&gt;id_str;
$desc=$twitterInfo-&gt;description;
if(!empty($username)){
/**
* Twitter Auth isleminden sonra auth_token onayı ile donen degerler burada.
* Gelişmiş bir login sistemi için bu blokta database islemleri ile,
* üye girişi ve register işlemi gerçekleştirebilirsiniz.
*/
$_SESSION[&#039;uid&#039;]=$twid;
$_SESSION[&#039;isim&#039;]=$isim;
$_SESSION[&#039;username&#039;]=$username;
$_SESSION[&#039;image&#039;]=$profilepic;
$_SESSION[&#039;desc&#039;]=addslashes($desc);

header(&quot;Location: index.php&quot;);

}else{
$url = $twitterObj-&gt;getAuthorizationUrl();
header(&quot;Location: &quot;.$url);
}
}

?&gt;
</pre>
<p>&nbsp;</p>
<p>login.php, twitter ile authorization onayı sağlandıktan sonra  gelen twitter profil bilgilerini basitçe $_SESSION değerlerine aktarıyoruz ve anasayfaya ( index.php) yönlendiriyoruz.</p>
<p>&nbsp;</p>
<h3> 4. Adım &#8211; uygulamamız için anasayfa index.php</h3>
<p>Demo uygulamasını çalıştırabilmemiz için index.php kodlarını aşağıya aktarıyorum.</p>
<p>&nbsp;</p>
<pre class="brush: php; ">

&lt;?php
@ob_start();
@session_start();
?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; dir=&quot;ltr&quot; lang=&quot;tr-TR&quot;&gt;
&lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot; /&gt;
&lt;title&gt;Serpito - Twitter ile bağlan&lt;/title&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;wrapperpub&quot;&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;div style=&quot;width:550px; float:left;&quot;&gt;
&lt;h1 id=&quot;blog-title&quot;&gt;&lt;a href=&quot;http://www.serpito.com/&quot; title=&quot;Serpito&quot;&gt;Serpito&lt;/a&gt;&lt;/h1&gt;
&lt;div&gt;Güncel Teknoloji ve Yazılım Blogu &lt;/div&gt;
&lt;/div&gt;&lt;!-- dp100 --&gt;
&lt;div style=&quot;width:300px; float:right;&quot;&gt;
&lt;a style=&quot;font:1.8em/1.5 museo-sans-500,helvetica,arial,sans-serif; color:#FFF;&quot; href=&quot;#&quot;&gt;Yazıya geri dön &amp;amp;amp;amp;amp;not;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;!--  #header --&gt;
&lt;/div&gt;&lt;!--  #wrapperpub --&gt;

&lt;div&gt;&lt;/div&gt;

&lt;p&gt;&lt;h2 style=&quot;color:#FFF; font:2.6em/1.5 museo-sans-500,helvetica,arial,sans-serif;&quot; align=&quot;center&quot;&gt;Twitter OAuth Demo Uygulaması&lt;/h2&gt;&lt;/p&gt;
&lt;div id=&quot;wrapper&quot; style=&quot;width:980px; min-height:250px; margin-top:10px; font-family:museo-sans-500,helvetica,arial,sans-serif;&quot;&gt;
&lt;div id=&quot;container&quot; style=&quot;width:940px;&quot;&gt;
&lt;?php
if(!isset($_SESSION[&#039;uid&#039;])){
?&gt;
&lt;p align=&quot;center&quot;&gt;Twitter ile Bağlan ? &lt;br /&gt;&lt;a href=&quot;login.php&quot;&gt;&lt;img src=&quot;btn.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;?php
}else{
?&gt;

&lt;div style=&quot;background-color:#FFEAA8; padding:5px; font-size:14px;&quot;&gt;&lt;div&gt;&lt;a href=&quot;http://twitter.com/&lt;?=$_SESSION[&#039;username&#039;]?&gt;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;&lt;?=$_SESSION[&#039;image&#039;]?&gt;&quot; height=&quot;100&quot; width=&quot;100&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;&lt;a href=&quot;http://twitter.com/&lt;?=$_SESSION[&#039;username&#039;]?&gt;&quot; title=&quot;&lt;?=$_SESSION[&#039;username&#039;]?&gt;?&gt;&quot;&gt;&lt;?=$_SESSION[&#039;username&#039;]?&gt;&lt;/a&gt;   /  &lt;small&gt;&lt;?=$_SESSION[&#039;isim&#039;]?&gt;&lt;/small&gt;&lt;/h2&gt;&lt;p&gt;&lt;?=$_SESSION[&#039;desc&#039;]?&gt;&lt;/p&gt;
&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt; OAuth Verileri&lt;/strong&gt;
&lt;pre&gt;
&lt;?=print_r($_SESSION);?&gt;
&lt;/pre&gt;
&lt;?php
}
?&gt;

&lt;/div&gt;
&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>&nbsp;</p>
<p><a href="http://www.serpito.com/projects/twitter/index.php" target="_blank"><img class="alignleft size-full wp-image-1475" title="demo" src="http://www.serpito.com/wp-content/uploads/demo.png" alt="" width="80" height="25" /></a></p>
<p>&nbsp;</p>
<p><a href="http://www.box.com/s/6io1l1cq1f19gn8dlmev"><img class="alignleft size-full wp-image-1476" title="download" src="http://www.serpito.com/wp-content/uploads/download.png" alt="" width="149" height="25" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/sign-in-with-twitter-oauth-twitter-ile-baglanmak/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP: JSON: AJAX: Youtube Video Aramaları</title>
		<link>http://www.serpito.com/php-json-ajax-youtube-video-aramalari/</link>
		<comments>http://www.serpito.com/php-json-ajax-youtube-video-aramalari/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 16:19:07 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[gdata]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json api]]></category>
		<category><![CDATA[json youtube]]></category>
		<category><![CDATA[youtube arama motoru]]></category>
		<category><![CDATA[youtube search]]></category>
		<category><![CDATA[Youtube Video Arama]]></category>
		<category><![CDATA[zeki müren]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1395</guid>
		<description><![CDATA[Yine uzun bi aradan sonra yazacak bi malzeme aklıma gelmişken, not düşeyim.  Youtube video arama tekniğini (gdata json api) kullanarak basit bir ajax arama sistemi yapalım. Uygulamada 2 farklı php dosyası oluşturduk. Ana dosya (index.php) ve ajax postun cevaplandığı arama (videosearch.php) dosyası uygulamanın çalışması için yeterlidir. Basit bir arama formu ile aranan kelime,  jquery post <a href="http://www.serpito.com/php-json-ajax-youtube-video-aramalari/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.serpito.com/wp-content/uploads/youtube.jpg"><img class="alignleft size-full wp-image-1480" title="youtube" src="http://www.serpito.com/wp-content/uploads/youtube.jpg" alt="" width="300" height="196" /></a>Yine uzun bi aradan sonra yazacak bi malzeme aklıma gelmişken, not düşeyim.  Youtube video arama tekniğini (<a href="http://code.google.com/apis/youtube/2.0/developers_guide_json.html" target="_blank">gdata json api</a>) kullanarak basit bir ajax arama sistemi yapalım.</p>
<p>Uygulamada 2 farklı php dosyası oluşturduk. Ana dosya (index.php) ve ajax postun cevaplandığı arama (videosearch.php) dosyası uygulamanın çalışması için yeterlidir.</p>
<p>Basit bir arama formu ile aranan kelime,  jquery post methodu ile, videosearch.php dosyasına aktarılır ve youtube gdata apisine gönderilir.</p>
<p>index.php kodlarını inceleyelim: <span id="more-1395"></span></p>
<pre class="brush: php; ">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Youtube JSON Video Arama - Serpito&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;?php
if(isset($_GET[&#039;q&#039;])){
?&gt;
$.ajax({
type: &#039;POST&#039;,
url: &#039;videosearch.php&#039;,
data: &#039;key=&lt;?=$_GET[&#039;q&#039;]?&gt;&#039;,
success:function(ajaxCevap) {
$(&#039;#sonuclar&#039;).html(ajaxCevap);
}
});
&lt;?php
}
?&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Serpito.com demo&lt;/h1&gt;
&lt;hr /&gt;
&lt;form method=&quot;get&quot;&gt;&lt;strong&gt;Aranacak kelime:&lt;/strong&gt; &lt;input type=&quot;text&quot; name=&quot;q&quot; value=&quot;&lt;?=$_GET[&#039;q&#039;]?&gt;&quot;/&gt; &lt;input type=&quot;submit&quot; value=&quot;Ara&quot; /&gt;&lt;/form&gt;
&lt;p&gt;&amp;amp;nbsp;&lt;/p&gt;

&lt;div id=&quot;sonuclar&quot; align=&quot;center&quot;&gt;
&lt;?php
if(isset($_GET[&#039;q&#039;])){
?&gt;
&lt;img src=&quot;http://www.biyografim.net/images/fav-loader.gif&quot; align=&quot;middle&quot; /&gt;
&lt;br /&gt;
&lt;strong&gt;Sonuçlar yükleniyor&lt;/strong&gt;
&lt;?php
}else{
?&gt;

&lt;strong&gt;Videolar için arama kutucuğunu kullanınız.&lt;/strong&gt;
&lt;?php
}
?&gt;
&lt;/div&gt;

&lt;hr /&gt;

&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
Bu demo &lt;strong&gt;&lt;a href=&quot;http://www.serpito.com/php-json-ajax-youtube-video-aramalari/&quot;&gt;PHP: JSON: AJAX: Youtube Video Aramaları&lt;/a&gt;&lt;/strong&gt; yazısı için hazırlanmıştır.

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>index.php ile alınan arama kelimesi, kodlarda görebileceğiniz gibi jquery yardımıyla videosearch.php dosyasına post edilir ve gelen cevap <strong>sonuclar</strong> div katmanının içine aktarılır.</p>
<p>videosearch.php kodları:</p>
<pre class="brush: php; ">

&lt;style&gt;
html{font-family:Verdana, Geneva, sans-serif; font-size:11px;}

a{color:#009; text-decoration:none;}
a img{border:none;}
&lt;/style&gt;
&lt;?php
$key=$_POST[&#039;key&#039;];

function VideoSearch($searchTerms) {
$googleBaseUrl = &quot;http://gdata.youtube.com/feeds/api/videos?q=&quot;.$searchTerms.&quot;&amp;amp;format=5&amp;amp;start-index=1&amp;amp;max-results=20&amp;amp;v=2&amp;amp;alt=jsonc&quot;; /* CURL ile bağlanılacak youtube gdata bağlantısı*/
$googleFullUrl = $googleBaseUrl;
$curlObject = curl_init();
curl_setopt($curlObject,CURLOPT_URL,$googleFullUrl);
curl_setopt($curlObject,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curlObject,CURLOPT_HEADER,false);
curl_setopt($curlObject,CURLOPT_REFERER,&quot;http://www.serpito.com/&quot;);
$returnGoogleSearch = curl_exec($curlObject);
curl_close($curlObject);
$returnGoogleSearch = json_decode($returnGoogleSearch,true); /*json formatında gelen cevap decode edilir*/
return $returnGoogleSearch[&#039;data&#039;][&#039;items&#039;];
}

$setSearchTerms = urlencode($key);
$searchResults = VideoSearch($setSearchTerms);
if(sizeof($searchResults)&gt;0){
foreach($searchResults as $result){
?&gt;
&lt;div style=&quot;width:150px; float:left; padding:3px; margin:5px; height:130px; overflow:hidden;&quot;&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=&lt;?=$result[&#039;id&#039;]?&gt;&quot; title=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot;&gt;
&lt;img src=&quot;&lt;?=$result[&#039;thumbnail&#039;][&#039;sqDefault&#039;]?&gt;&quot; width=&quot;120&quot; alt=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot; title=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot;/&gt;
&lt;/a&gt;
&lt;p align=&quot;center&quot;&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=&lt;?=$result[&#039;id&#039;]?&gt;&quot; title=&quot;&lt;?=$result[&#039;title&#039;]?&gt;&quot;&gt;
&lt;?=$result[&#039;title&#039;]?&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;?php
}
}
?&gt;
</pre>
<p>Uygulamanın çalışır demosu için <a href="http://serpito.com/projects/youtube/?q=zeki+m%C3%BCren" target="_blank">tıklayınız.</a></p>
<p>Uygulama dosyalarını indirmek için <a href="http://www.box.net/shared/tyh6onka8oojqc3rkvt8" target="_blank">tıklayınız.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-json-ajax-youtube-video-aramalari/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP: Tarih formatlama fonksiyonu</title>
		<link>http://www.serpito.com/php-tarih-formatlama-fonksiyonu/</link>
		<comments>http://www.serpito.com/php-tarih-formatlama-fonksiyonu/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 14:15:41 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[php date]]></category>
		<category><![CDATA[php örnekler]]></category>
		<category><![CDATA[php tarih]]></category>
		<category><![CDATA[php tarih_format fonksiyonu]]></category>
		<category><![CDATA[php uygulamalar]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1270</guid>
		<description><![CDATA[Şenol&#8217;un son yazısına atfen , tarih bilgilerini formatlayan bir fonksiyon ekleyim istedim. fonksiyonun adı format_tarih(); fonksiyon içeriği şu şekilde; function format_tarih($tarih){ $gun=substr($tarih,8,2); $ay=substr($tarih,5,2); $yil=substr($tarih,0,4); return $son_t=$gun.&#34;.&#34;.$ay.&#34;.&#34;.$yil; } Fonksiyonu kullanabilmek için şu şekilde çağırabilirsiniz; $tarih=date(&#34;Y-m-d H:i:s&#34;); echo $bugun=format_tarih($tarih); çalışan betiğin çıktısı 27.12.2010]]></description>
			<content:encoded><![CDATA[<p>Şenol&#8217;un <a href="http://www.serpito.com/php-tarih-sinifi/" target="_blank">son yazısına atfen</a> , tarih bilgilerini formatlayan bir fonksiyon ekleyim istedim.</p>
<p>fonksiyonun adı <strong>format_tarih()</strong>;</p>
<p>fonksiyon içeriği şu şekilde;</p>
<pre class="brush: php; ">

function format_tarih($tarih){
$gun=substr($tarih,8,2);
$ay=substr($tarih,5,2);
$yil=substr($tarih,0,4);
return $son_t=$gun.&quot;.&quot;.$ay.&quot;.&quot;.$yil;
}
</pre>
<p>Fonksiyonu kullanabilmek için şu şekilde çağırabilirsiniz;</p>
<pre class="brush: php; ">

$tarih=date(&quot;Y-m-d H:i:s&quot;);
echo $bugun=format_tarih($tarih);
</pre>
<p>çalışan betiğin çıktısı <strong>27.12.2010</strong><br />
<strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-tarih-formatlama-fonksiyonu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Php: file_exists (Dosya Kontrolü)</title>
		<link>http://www.serpito.com/php-file_exists-dosya-kontrolu/</link>
		<comments>http://www.serpito.com/php-file_exists-dosya-kontrolu/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 21:18:56 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[dosya]]></category>
		<category><![CDATA[dosya kontrolü]]></category>
		<category><![CDATA[file_exists]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1169</guid>
		<description><![CDATA[Php ile sistemlerimize resim, yazı vb dosyaların olup olmadığını kotrol etmek için file_exists komutunu kullanabiliriz. Uyelik sistemimizde uyemizin resmi varsa üye resimini, resmi yoksa standart olarak belirlemiş olduğumuz bir resmin gelmesini, urunlerimizin fotograflarının sistemimizde yer alıp almadığını ve fotograf sistemimizde yer almıyorsa standart bir fotograf getirme işlemlerinde file_exists i kullanabiliriz. &#60;?php if ( file_exists( &#34;ornek.jpg&#34; <a href="http://www.serpito.com/php-file_exists-dosya-kontrolu/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Php ile sistemlerimize resim, yazı vb dosyaların olup olmadığını kotrol etmek için file_exists komutunu kullanabiliriz.<br />
Uyelik sistemimizde uyemizin resmi varsa üye resimini, resmi yoksa standart olarak belirlemiş olduğumuz bir resmin gelmesini,<span id="more-1169"></span> urunlerimizin fotograflarının sistemimizde yer alıp almadığını ve fotograf sistemimizde yer almıyorsa standart bir fotograf getirme işlemlerinde file_exists i kullanabiliriz.</p>
<pre class="brush: php; ">

&lt;?php
if ( file_exists( &quot;ornek.jpg&quot; ) ) {
echo &quot;Dosya Var&quot;;
}else {
echo &quot;Dosya Yok&quot;;
}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-file_exists-dosya-kontrolu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Antalya&#8217;da iş arayan PHP &amp; MySQL developer?</title>
		<link>http://www.serpito.com/antalyada-yasayan-php-developer/</link>
		<comments>http://www.serpito.com/antalyada-yasayan-php-developer/#comments</comments>
		<pubDate>Thu, 27 May 2010 12:54:18 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Güncel]]></category>
		<category><![CDATA[antalya]]></category>
		<category><![CDATA[iş ilanı]]></category>
		<category><![CDATA[kariyer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1107</guid>
		<description><![CDATA[Antalya&#8217;da iş arayan PHP &#38; MySQL kodlama yapabilen, tam / yarı zamanlı çalışabilecek olan arkadaşlar arıyorum.  İlgilenenler serpito{AT}gmail{.}com  adresine e-posta gönderebilir.]]></description>
			<content:encoded><![CDATA[<p>Antalya&#8217;da iş arayan PHP &amp; MySQL kodlama yapabilen, tam / yarı zamanlı çalışabilecek olan arkadaşlar arıyorum.  İlgilenenler serpito{AT}gmail{.}com  adresine e-posta gönderebilir.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/antalyada-yasayan-php-developer/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Php: Xml Okuma</title>
		<link>http://www.serpito.com/php-xml-okuma/</link>
		<comments>http://www.serpito.com/php-xml-okuma/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 22:14:58 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[php xml script]]></category>
		<category><![CDATA[simple xml load]]></category>
		<category><![CDATA[simplexml_load_file]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xml okuma]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=1025</guid>
		<description><![CDATA[Web sitelerimizde verileri kullanıcılara yansıtırken xml dosyalarından verileri php ile okuma geregi duyabiliriz bunun dışında verilerimizi hazır bulunan xml dosyalarından çekerek kendi veri tabanımıza aktarma gereği gerekebilir.BU gibi durumlarda php&#8217;de &#8220;simplexml_load_file&#8221; bizim ilacımız oluyor. XML dosya yapımız. &#60;?xml version=&#34;1.0&#34; encoding=&#34;ISO-8859-9&#34;?&#62; &#60;gumusluoglu&#62; &#60;konu sira=&#34;1&#34;&#62; &#60;baslik&#62;AJAX Fantastik Form Doğrulama&#60;/baslik&#62; &#60;link&#62;http://www.gumusluoglu.com/kategoriler/ajax-fantastik-form-dogrulama/&#60;/link&#62; &#60;icerik&#62;Özellikle formlar aracılığı ile kullanıcılarla etkileşimde olunan <a href="http://www.serpito.com/php-xml-okuma/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.serpito.com/wp-content/uploads/php_xml.jpg"><img class="alignleft size-full wp-image-1491" title="php_xml" src="http://www.serpito.com/wp-content/uploads/php_xml.jpg" alt="" width="300" height="300" /></a>Web sitelerimizde verileri kullanıcılara yansıtırken xml dosyalarından verileri php ile okuma geregi duyabiliriz bunun dışında verilerimizi hazır bulunan xml dosyalarından çekerek kendi veri tabanımıza aktarma gereği gerekebilir.BU gibi durumlarda php&#8217;de &#8220;simplexml_load_file&#8221; bizim ilacımız oluyor.<br />
<span id="more-1025"></span><br />
XML dosya yapımız.</p>
<pre class="brush: xml; ">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-9&quot;?&gt;
&lt;gumusluoglu&gt;
&lt;konu sira=&quot;1&quot;&gt;
&lt;baslik&gt;AJAX Fantastik Form Doğrulama&lt;/baslik&gt;
&lt;link&gt;http://www.gumusluoglu.com/kategoriler/ajax-fantastik-form-dogrulama/&lt;/link&gt;
&lt;icerik&gt;Özellikle formlar aracılığı ile kullanıcılarla etkileşimde olunan durumlarda işlem yapanın gerçek bir kullanıcı mı yoksa otomatik bir bot mu olduğunu kontrol etmek zorunlu olmaktadır. Piyasada bulunan Captcha uygulamalarından en dikkat çekici olanını inceleyelim.

Jquery UI kullanarak gerçekleştirilen bu sistemde basit bir index kullanımı ile aktif hale gelebiliyor. Kodları inceleyelim;&lt;/icerik&gt;
&lt;etiket&gt;jquery, css, forum, form doğrulama&lt;/etiket&gt;
&lt;/konu&gt;

&lt;konu sira=&quot;2&quot;&gt;
&lt;baslik&gt;Jquery Fade In/Fade Out Efekt&lt;/baslik&gt;
&lt;link&gt;http://www.gumusluoglu.com/kategoriler/jquery-fade-infade-out-efekt/&lt;/link&gt;
&lt;icerik&gt;Jquery yazılımcıların ve tasarımcıların oldukça kullanışlı ve görsel özellikli projeler yapmasına yardımcı olan muhteşem bir kütüphanedir. Bu mutheşem kütüphanenin nimetlerinden yararlanmaya devam ediyoruz. Ziyaretcilerimizi sitemizi dolaşırken mause imleci ile bir nesnenin üzerine geldiklerinde nesnenin belirmesini (orjinal haline dönmesini) sağlayan, mauseu nesne üzerinden çekince ise soluklaşmasını sağlayan uygulama yapacağız. Nesnelerimiz ilk olarak solgun bir haldeler, ziyaretcilerimiz nesneleri seçmek istedikleri anda yavaş yavaş kendi orjinal renklerine dönüyorlar.&lt;/icerik&gt;
&lt;etiket&gt;jquery,css,fade in,fade out&lt;/etiket&gt;
&lt;/konu&gt;

&lt;konu sira=&quot;3&quot;&gt;
&lt;baslik&gt;Jquery Fade In/Fade Out Efekt&lt;/baslik&gt;
&lt;link&gt;http://www.gumusluoglu.com/kategoriler/jquery-fade-infade-out-efekt/&lt;/link&gt;
&lt;icerik&gt;Jquery yazılımcıların ve tasarımcıların oldukça kullanışlı ve görsel özellikli projeler yapmasına yardımcı olan muhteşem bir kütüphanedir. Bu mutheşem kütüphanenin nimetlerinden yararlanmaya devam ediyoruz. Ziyaretcilerimizi sitemizi dolaşırken mause imleci ile bir nesnenin üzerine geldiklerinde nesnenin belirmesini (orjinal haline dönmesini) sağlayan, mauseu nesne üzerinden çekince ise soluklaşmasını sağlayan uygulama yapacağız. Nesnelerimiz ilk olarak solgun bir haldeler, ziyaretcilerimiz nesneleri seçmek istedikleri anda yavaş yavaş kendi orjinal renklerine dönüyorlar.&lt;/icerik&gt;
&lt;etiket&gt;jquery,css,fade in,fade out&lt;/etiket&gt;
&lt;/konu&gt;

&lt;konu sira=&quot;4&quot;&gt;
&lt;baslik&gt;Jquery Alışveriş Sepeti (Sürükle Bırak)&lt;/baslik&gt;
&lt;link&gt;http://www.gumusluoglu.com/kategoriler/jquery-alisveris-sepeti-surukle-birak/&lt;/link&gt;
&lt;icerik&gt;E-ticaret sistemlerimizde yer alan ürünlerin kullanıcılar tarafından sepete ekleme işlemleri oldukça önemli ve dikkat edilmesi gereken bir konudur. Sepete eklemek için birden çok yolu kullana biliriz sepete ekle; iconu, butonu veya linki ile sepete ekleme işlemlerinin gerçekleşmesini sağlıya biliriz.&lt;/icerik&gt;
&lt;etiket&gt;Jquery, Mysql, Php, css, javascript &lt;/etiket&gt;
&lt;/konu&gt;

&lt;konu sira=&quot;5&quot;&gt;
&lt;baslik&gt;Jquery Form Validator&lt;/baslik&gt;
&lt;link&gt;http://www.gumusluoglu.com/kategoriler/jquery-form-validator/&lt;/link&gt;
&lt;icerik&gt;Formlarımızda yer alan bölümlerin eksiksiz ve uygunbir şekilde kullanıcı tarafından doldurulup doldurulmadığını post edildikten sonra kontrol edebileceğimiz gibi, kullanıcı formu doldururken de kontrol edebiliriz. Bu örneğimizde kullanıcı verileri girip onaylamadan önce formda boş veya yalnış bir veri varmı kontrol edeceğiz.&lt;/icerik&gt;
&lt;etiket&gt;Jquery, css &lt;/etiket&gt;
&lt;/konu&gt;
&lt;/gumusluoglu&gt;
</pre>
<p>XML dosyamızda &#8220;gumusluoglu&#8221; ana etiketi altında &#8220;konu&#8221; alt etiketleri içerisinde yer alan verileri çekerek ekrana yazdıracağız. İstersek gelen verileri veri tabanımızada kaydede biliriz.</p>
<p>okuma.php dosyaımız (Xml dosyamızı okumamızı sağlayan php dosyamız)</p>
<pre class="brush: php; ">

&lt;?php
header(&quot;Content-Type: text/html; charset=utf8&quot;);
$a=simplexml_load_file(&quot;icerik.xml&quot;);
foreach ($a-&gt;konu as $konu) {
echo $baslik=$konu-&gt;baslik.&#039;&lt;br&gt;&#039;;
echo $link=$konu-&gt;link.&#039;&lt;br&gt;&#039;;
echo $icerik=$konu-&gt;icerik.&#039;&lt;br&gt;&#039;;
echo $etiket=$konu-&gt;etiket.&#039;&lt;br&gt;&#039;;
echo &quot;&lt;hr&gt;&quot;;
}
?&gt;
</pre>
<p>okuma.php dosyamızdaki kodlarımız ile ilk olarak icerik.xml dosyamızı simplexml_load_file ile &#8220;a&#8221; değişkenine attık. Ardından gelen verileri foreach döngümüz ile alıyoruz. &#8220;a&#8221; değişkenine simplexml_load_file ile attığımız icerik.xml dosyamızın içerindeki her konu alt tağını konu değişkenine attık. Ardından $baslik=$konu-&gt;baslik kodu ile baslik tagı içerisinde gelen veriyi baslik değişkenine atmış oluyoruz.</p>
<p>Uygulama dosyalarını <a href="http://www.box.net/shared/5m9qkqjun0" target="_blank">zip şeklinde indirmek için tıklayınız.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-xml-okuma/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP: IE6 derdinden kurtulmak</title>
		<link>http://www.serpito.com/php-ie6-derdinden-kurtulmak/</link>
		<comments>http://www.serpito.com/php-ie6-derdinden-kurtulmak/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 23:35:39 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[explorer 6]]></category>
		<category><![CDATA[güvenli internet]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=996</guid>
		<description><![CDATA[Web geliştiriciler için en sıkıntı veren durum şüphesiz Internet Explorer 6 tarayıcılardır. Kısa bir süre önce   Google ve Youtube gibi önemli markalar ie6 tarayıcılarla artık uğraşmayacaklarını ilan ettiler. Ben de bazı projelerde kullandığım bu ie6 tarayıcı banlama uygulamasını artık gönül rahatlığıyla kullanabileceğim. Aşağıdaki kodları sayfanızın en başına eklerseniz Internet Explorer 6.0 versiyonlu tarayıcılarla gelen ziyaretçi <a href="http://www.serpito.com/php-ie6-derdinden-kurtulmak/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-997" title="ie6-ban" src="http://www.serpito.com/wp-content/uploads/ie6-ban.gif" alt="internet expllorer ban block" width="566" height="260" /></p>
<p>Web geliştiriciler için en sıkıntı veren durum şüphesiz Internet Explorer 6 tarayıcılardır. Kısa bir süre önce   Google ve Youtube gibi önemli markalar ie6 tarayıcılarla <a href="http://yahoyt.com/h/6768/google-ie6-destegini-cekiyor" target="_blank">artık uğraşmayacaklarını ilan ettiler</a>. Ben de bazı projelerde kullandığım bu ie6 tarayıcı banlama uygulamasını artık gönül rahatlığıyla kullanabileceğim.</p>
<p>Aşağıdaki kodları sayfanızın en başına eklerseniz Internet Explorer 6.0 versiyonlu tarayıcılarla gelen ziyaretçi görseldeki mesajla karşılaşacaktır. Kodlara geçelim;</p>
<p><span id="more-996"></span></p>
<h3>index.php</h3>
<pre class="brush: php; ">

&lt;?php
$useragent = $_SERVER[&#039;HTTP_USER_AGENT&#039;];

if (preg_match(&#039;|MSIE ([0-9].[0-9]{1,2})|&#039;,$useragent,$matched)) {
$browser_version=$matched[1];
$browser = &#039;IE&#039;;
}

if($browser_version==&#039;6.0&#039;){

?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;

&lt;title&gt;Web Tarayıcınız çok eski&lt;/title&gt;
&lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;/**/
body { text-align:center; font-family:sans-serif; margin-top:50px; }
div.desc { margin:auto; background:#ffa; color:#110; font-size:18px; padding:20px; width:850px; }
ul.browsers { list-style:none; padding:0; margin:50px auto 0 auto; width:1000px; }
ul.browsers li { text-align:center; display:block; float:left; width:200px; height:300px; margin-left:25px; }
img { border:0; }
/**/&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;
&lt;b&gt;Lütfen okuyun;&lt;/b&gt; Kullandığınız web tarayıcı, yani &lt;b&gt;Internet Explorer 6&lt;/b&gt;, çok eski ve bu siteyi gösterebilecek kabiliyetlere sahip değil. &lt;b&gt;Artık daha iyi bir web tarayıcı yüklemenin vakti geldi&lt;/b&gt;. aşağıdaki yeni ve başarılı web tarayıcılardan bir tanesine tıklayarak indirme sayfasına gidebilirsiniz.
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;h2&gt;Mozilla Firefox&lt;/h2&gt;
&lt;a href=&quot;http://www.mozilla-europe.org/tr/firefox/&quot;&gt;&lt;img src=&quot;/firefox.jpg&quot; width=&quot;200&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h2&gt;Google Chrome&lt;/h2&gt;
&lt;a href=&quot;http://www.google.com/chrome/index.html?hl=tr&quot;&gt;&lt;img src=&quot;/chrome.jpg&quot; width=&quot;200&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h2&gt;Apple - Safari&lt;/h2&gt;
&lt;a href=&quot;http://www.apple.com/safari&quot;&gt;&lt;img src=&quot;/safari.jpg&quot; width=&quot;200&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h2&gt;Opera&lt;/h2&gt;
&lt;a href=&quot;http://www.opera.com/&quot;&gt;&lt;img src=&quot;/opera.jpg&quot; width=&quot;200&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;?php

die();
}
?&gt;

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xml:lang=&quot;en&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;en&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-9&quot; /&gt;
&lt;title&gt;serpito.com ie6 ban uygulaması&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
index.php dosyası

&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-ie6-derdinden-kurtulmak/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP:AJAX: Fancy Captcha Uygulaması</title>
		<link>http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/</link>
		<comments>http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 16:20:20 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Ajax Captcha]]></category>
		<category><![CDATA[Captcha]]></category>
		<category><![CDATA[catchpa]]></category>
		<category><![CDATA[Fancy Captcha]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=967</guid>
		<description><![CDATA[Özellikle formlar aracılığı ile kullanıcılarla etkileşimde olunan durumlarda işlem yapanın gerçek bir kullanıcı mı yoksa otomatik bir bot mu olduğunu kontrol etmek zorunlu olmaktadır. Piyasada bulunan Captcha uygulamalarından en dikkat çekici olanını inceleyelim. Jquery UI kullanarak gerçekleştirilen bu sistemde basit bir index kullanımı ile aktif hale gelebiliyor. Kodları inceleyelim; index.html &#38;lt;html&#38;gt; &#38;lt;head&#38;gt; &#38;lt;meta http-equiv=&#38;quot;Content-type&#38;quot; content=&#38;quot;text/html; <a href="http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-968" title="fancy-capchta" src="http://www.serpito.com/wp-content/uploads/fancy-capchta.gif" alt="Ajax Fancy Catpcha Script" width="543" height="117" /></p>
<p>Özellikle formlar aracılığı ile kullanıcılarla etkileşimde olunan durumlarda işlem yapanın gerçek bir kullanıcı mı yoksa otomatik bir bot mu olduğunu kontrol etmek zorunlu olmaktadır. Piyasada bulunan <a href="http://www.google.com.tr/search?hl=tr&amp;q=ajax+captcha&amp;sourceid=navclient-ff&amp;rlz=1B3GGGL_trTR338TR338&amp;ie=UTF-8&amp;aq=0&amp;oq=ajax+capt" target="_blank">Captcha</a> uygulamalarından en dikkat çekici olanını inceleyelim.</p>
<p><a href="http://jqueryui.com" target="_blank">Jquery UI</a> kullanarak gerçekleştirilen bu sistemde basit bir index kullanımı ile aktif hale gelebiliyor. Kodları inceleyelim;</p>
<p><span id="more-967"></span></p>
<h3>index.html</h3>
<pre class="brush: php; ">

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;
 &amp;lt;title&amp;gt;Serpito.com Ajax Captcha Uygulaması&amp;lt;/title&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;latest-jquery/jquery-1.3.2.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;latest-jquery-ui/jquery-ui-1.7.2.custom.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;captcha/jquery.captcha.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;link href=&amp;quot;captcha/captcha.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
 &amp;lt;style type=&amp;quot;text/css&amp;quot; media=&amp;quot;screen&amp;quot;&amp;gt;
 body { background-color: white; }
 &amp;lt;/style&amp;gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;
 $(function() {
 $(&amp;quot;.ajax-fc-container&amp;quot;).captcha({
 borderColor: &amp;quot;silver&amp;quot;,
 text: &amp;quot;Gerçek bir kullanıcıysan &amp;lt;span&amp;gt;makas&amp;lt;/span&amp;gt; i daireye sürükle.&amp;quot;
 });
 });
 &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;div&amp;gt;captcha uygulamasını görebilmek için tarayıcınızın javascript özelliğini açmalısınız!&amp;lt;/div&amp;gt;

&amp;lt;!-- ornek icin basit bir form --&amp;gt;
&amp;lt;form action=&amp;quot;captcha/captcha.php&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;myForm&amp;quot;&amp;gt;
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;myField1&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;myField2&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;formu gönder!&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;!-- form sonu --&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
</pre>
<p>Uygulamanı tüm dosyalarını tek tek buraya kodlamak boşuna vakit kaybı olacaktır. Basit bir şekilde formlara entegre etmenin yolunu paylaştık.</p>
<p>Uygulamanın <a href="http://www.serpito.com/projects/ajax-fancy-captcha-php/">çalışır demosunu incelemek için tıklayınız.</a></p>
<p>Uygulama dosyalarını <a href="http://www.box.net/shared/xdupcy5uga" target="_blank">zip şeklinde indirmek için tıklayınız. </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-ajax-fancy-captcha-uygulamasi/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ajax: Fly to Basket (Uçan Sepet) Uygulaması</title>
		<link>http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/</link>
		<comments>http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:29:57 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[basket]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[fly to basket]]></category>
		<category><![CDATA[sepet]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=955</guid>
		<description><![CDATA[E-ticaret sistemlerimizde kullanıcıların ürünleri sepete atıp atmadıklarından emin olmaları çok önemlidir. Kullanıcı emin olmadığı bir işlemde urunu birden fazla sepete ekleye bilir. Bu uygulamamızda ürünü kullanıcı sepete eklediğinde görsel olarak ürünümüzün fotografını sepet olarak belirtmiş olduğumuz bölmeye gönderiyoruz. Sayfamızda yer alacak olan ürünler için örnek bir kod: &#38;lt;div class=&#38;quot;product_container&#38;quot;&#38;gt; &#38;lt;div id=&#38;quot;slidingProduct8&#38;quot; class=&#38;quot;sliding_product&#38;quot;&#38;gt; &#38;lt;img src=&#38;quot;images/d4abf6cf79b0770a99b01d791595abc3.jpg&#38;quot; width=&#38;quot;90&#38;quot; <a href="http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>E-ticaret sistemlerimizde kullanıcıların ürünleri sepete atıp atmadıklarından emin olmaları çok önemlidir. Kullanıcı emin olmadığı bir işlemde urunu birden fazla sepete ekleye bilir. Bu uygulamamızda ürünü kullanıcı sepete eklediğinde görsel olarak ürünümüzün fotografını sepet olarak belirtmiş olduğumuz bölmeye gönderiyoruz.<br />
<img class="aligncenter size-full wp-image-959" title="Fly to Basket" src="http://www.serpito.com/wp-content/uploads/1.gif" alt="" width="600" height="119" /><br />
<span id="more-955"></span><br />
Sayfamızda yer alacak olan ürünler için örnek bir kod:</p>
<pre class="brush: php; ">

			&amp;lt;div class=&amp;quot;product_container&amp;quot;&amp;gt;
				&amp;lt;div id=&amp;quot;slidingProduct8&amp;quot; class=&amp;quot;sliding_product&amp;quot;&amp;gt;
					&amp;lt;img src=&amp;quot;images/d4abf6cf79b0770a99b01d791595abc3.jpg&amp;quot; width=&amp;quot;90&amp;quot; height=&amp;quot;120&amp;quot;&amp;gt;
					Erkekler ve Diğer Felekatler&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
					12.50
				&amp;lt;/div&amp;gt;
				&amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;addToBasket(8);return false&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;images/basket.gif&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;
				&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
			&amp;lt;/div&amp;gt;
</pre>
<p>Sepete Ekle(basket.gif) tıklanıldığında &#8220;addToBasket(8)&#8221; ile ürün id mizi &#8220;addProduct.php&#8221; dosyamıza yolluyoruz ve gelen productId ye göre select case ile ürün özelliklerini belirleyip &#8220;Alışveriş Sepeti&#8221; alanına yazdırıyoruz.</p>
<p>addProduct.php kodlarımız</p>
<pre class="brush: php; ">

&amp;lt;?
header(&amp;quot;Content-Type: text/html; charset=iso-8859-9&amp;quot;);
if(!isset($_POST[&#039;productId&#039;]))exit;
switch($_POST[&#039;productId&#039;]){

	case &amp;quot;1&amp;quot;;
		echo &amp;quot;1|||Ölümcül İklim|||20&amp;quot;;
		break;
	case &amp;quot;2&amp;quot;;
		echo &amp;quot;2|||Cesur Teklif|||25&amp;quot;;
		break;
	case &amp;quot;3&amp;quot;;
		echo &amp;quot;3|||Kan Kokusu|||35&amp;quot;;
		break;
	case &amp;quot;4&amp;quot;;
		echo &amp;quot;4|||Ödünç Yaşam|||10&amp;quot;;
		break;
	case &amp;quot;5&amp;quot;;
		echo &amp;quot;5|||Alamut Cenneti|||22&amp;quot;;
		break;
	case &amp;quot;6&amp;quot;;
		echo &amp;quot;6|||Pazartesi Erkeğie|||14&amp;quot;;
		break;
	case &amp;quot;7&amp;quot;;
		echo &amp;quot;7|||Gilead|||15&amp;quot;;
		break;
	case &amp;quot;8&amp;quot;;
		echo &amp;quot;8|||Erkekler ve Diğer Felekatler|||12.5&amp;quot;;
		break;
}
?&amp;gt;
</pre>
<p>Sepetimizde yer alan ürünlerin adetlerini ve fiyat toplamını ise &#8220;fly-to-basket.js&#8221; dosyamız aracılığıyla hesaplıyoruz. &#8220;fly-to-basket.js&#8221; dosyamızdaki &#8220;flyingSpeed&#8221; değişkenimiz ile ürüne tıklanıldığında sepete gitme hızını belirlemiş oluyoruz.</p>
<p>Uygulamamızda sadece ürünün sepete gitme işlemini gerçekleştirdik. Sepete gitti anda kullanıcının sepetine veri tabanında eklemek istiyorsak &#8220;addProduct.php&#8221; dosyamızda case in altına veri tabanımıza ekleyecek olan mysql kodlarımızı yazabiliriz.</p>
<pre class="brush: php; ">

	case &amp;quot;7&amp;quot;;
		echo &amp;quot;7|||Gilead|||15&amp;quot;;
                $q=$dba-&amp;gt;query(&amp;quot;INSERT INTO sepet(urun_ıd,user_id) VALUES (7,&#039;$_session[&#039;user_id&#039;]&#039;) &amp;quot;);
		break;
</pre>
<p>Uygulamanın <a href="http://www.serpito.com/projects/flybasket/">çalışır demosunu incelemek için tıklayınız.</a></p>
<p>Uygulama dosyalarını <a href="http://www.box.net/shared/thtz71sg93" target="_blank">zip şeklinde indirmek için tıklayınız. </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/ajax-fly-to-basket-ucan-sepet-uygulamasi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP: Domain Sorgulama Uygulaması (Whois Search)</title>
		<link>http://www.serpito.com/php-domain-sorgulama-whois-search/</link>
		<comments>http://www.serpito.com/php-domain-sorgulama-whois-search/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 13:17:33 +0000</pubDate>
		<dc:creator>Atilla Akoğlu</dc:creator>
				<category><![CDATA[İnternet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Web kaynakları]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[domain sorgulama]]></category>
		<category><![CDATA[online domain sorgulama]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[whois]]></category>
		<category><![CDATA[whois search]]></category>

		<guid isPermaLink="false">http://www.serpito.com/?p=934</guid>
		<description><![CDATA[Yeni bir proje için en temel öğe uygun domain bulabilmektir.  Bu uygulamamızda yerel sunucunuzda dilediğiniz domainin whois kayıtlarını sorgulama olayını inceleyeceğiz. Bu uygulama için class.whois.php PHP sınıfını kullanıyoruz. index.php &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;?php $domain=$_GET[&#039;domain&#039;]; ?&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=iso-8859-9&#34; /&#62; &#60;title&#62;&#60; &#60;?=$domain?&#62; &#62; Domain arama&#60;/title&#62; &#60;/head&#62; &#60;body&#62; <a href="http://www.serpito.com/php-domain-sorgulama-whois-search/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-935" title="php whois" src="http://www.serpito.com/wp-content/uploads/whois.gif" alt="php domain whois" width="565" height="164" /></p>
<p>Yeni bir proje için en temel öğe uygun domain bulabilmektir.  Bu uygulamamızda yerel sunucunuzda dilediğiniz domainin whois kayıtlarını sorgulama olayını inceleyeceğiz.</p>
<p>Bu uygulama için <strong>class.whois.php</strong> PHP sınıfını kullanıyoruz.</p>
<p><span id="more-934"></span></p>
<h3>index.php</h3>
<pre class="brush: php; ">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;?php
$domain=$_GET[&#039;domain&#039;];
?&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-9&quot; /&gt;
&lt;title&gt;&lt; &lt;?=$domain?&gt; &gt; Domain arama&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;h2&gt;Serpito Domain Whois Sorgulama aracı&lt;/h2&gt;
&lt;div style=&quot;width:100%px; height:50px; background-color:#E3E3DD; padding-top:5px; margin-top:10px;&quot; align=&quot;center&quot;&gt;
&lt;form method=&quot;get&quot; enctype=&quot;application/x-www-form-urlencoded&quot;&gt;
&lt;input type=&quot;text&quot; value=&quot;&lt;?=$domain?&gt;&quot; style=&quot;height:24px; padding-left:4px; color:#7E703A; padding-top:5px; font-weight:bold; width:200px;&quot; name=&quot;domain&quot; /&gt;
&lt;/form&gt; &lt;code&gt;Örnek: serpito.com , google.com&lt;/code&gt;
&lt;/div&gt;
&lt;?php
if(isset($_GET[&#039;domain&#039;])){

function getwhois($domain, $tld)
{
require_once(&quot;class.whois.php&quot;);

$whois = new Whois();

if( !$whois-&gt;ValidDomain($domain.&#039;.&#039;.$tld) ){
return &#039;Sorry, the domain is not valid or not supported.&#039;;
}

if( $whois-&gt;Lookup($domain.&#039;.&#039;.$tld) )
{
return $whois-&gt;GetData(1);
}else{
return &#039;Sorry, an error occurred.&#039;;
}
}

$domain = trim($_REQUEST[&#039;domain&#039;]);

$dot = strpos($domain, &#039;.&#039;);
$sld = substr($domain, 0, $dot);
$tld = substr($domain, $dot+1);

$whois = getwhois($sld, $tld);
?&gt;
&lt;div align=&quot;center&quot; style=&quot;font-weight:bold; color:#42554E;&quot;&gt;
&lt;?php
echo &quot;&lt;pre&gt;&quot;;
echo $whois;
echo &quot;&lt;/pre&gt;&quot;;

?&gt;
&lt;/div&gt;
&lt;?php
}
?&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>Uygulamanın <a href="../projects/whois/" target="_blank">çalışır demosunu incelemek için tıklayınız.</a></strong></p>
<p><strong>Uygulama dosyalarını <a href="http://www.box.net/shared/1j8y341ba0" target="_blank">zip şeklinde indirmek için tıklayınız.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-domain-sorgulama-whois-search/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

