<?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>php ipuçları &#8211; Selman Tunc</title>
	<atom:link href="https://selmantunc.com.tr/tag/php-ipuclari/feed/" rel="self" type="application/rss+xml" />
	<link>https://selmantunc.com.tr</link>
	<description></description>
	<lastBuildDate>Sun, 30 Jun 2013 01:22:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://selmantunc.com.tr/wp-content/uploads/2023/07/cropped-tumblr_inline_oglumuMbgO1tyldvk_540-150x150-1-32x32.jpg</url>
	<title>php ipuçları &#8211; Selman Tunc</title>
	<link>https://selmantunc.com.tr</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>php 5 mvc yapısı nedir nasıl yapılır</title>
		<link>https://selmantunc.com.tr/uncategorized/php-5-mvc-yapisi-nedir-nasil-yapilir/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 30 Jun 2013 01:22:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<category><![CDATA[php5 mvc]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2013/06/30/php-5-mvc-yapisi-nedir-nasil-yapilir/</guid>

					<description><![CDATA[bu konuda çok bilgi veremeyeceğim ,umarım ilerde detaylı yazarım.fakat php mvc yapısını sadece yapıdan ve tanımlardan öğrenmek yerine kendim uygulayarak yapıyı daha iyi kavramaya çalıştım ve php bir mvc çatısı&#8230;]]></description>
										<content:encoded><![CDATA[<p>bu konuda çok bilgi veremeyeceğim ,umarım ilerde detaylı yazarım.<br><br>fakat php mvc yapısını sadece yapıdan ve tanımlardan öğrenmek yerine kendim uygulayarak yapıyı daha iyi kavramaya çalıştım ve php bir mvc çatısı oluşturdum  eğer merak ederseniz <a href="https://github.com/stnc/php-mvc">buradan</a> inceleyebilirsiniz.<br><br>aslında codeigniter ve laravel e bakarak klasor yapısını oluşturdum o yuzden genel bir yapıda diyebilirim.<br><br>Nasıl çalışır :<a name="more"></a>
<br><br>system/core klasöründe bootstrap.php de herşey MVC bacaklarına ayrılır burayı anlarsanız zaten olayı çözersiniz<br><br>birde index.php de autoload olayı vardır orada  sisitem çalıştığı anda gerekli tüm nesneler sisteme otomatik yüklenir.<br><br><a href="https://github.com/stnc/php-mvc/archive/master.zip">İndirme linki </a></p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php xxs temizleme</title>
		<link>https://selmantunc.com.tr/uncategorized/php-xxs-temizleme/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:55:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<category><![CDATA[xxs]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/php-xxs-temizleme/</guid>

					<description><![CDATA[php xxs temizleme çok kaliteli ve işe yarar..javascriptle bulaşacak tüm zararlı kodları temizlerbu siteden tüm testleri yapabilirsinizfunction xss_clean($str) { if (is_array($str) OR is_object($str)) { foreach ($str as $k =&#62; $s)&#8230;]]></description>
										<content:encoded><![CDATA[<p>php xxs temizleme  çok kaliteli ve işe yarar..<br /><br />javascriptle bulaşacak tüm zararlı kodları temizler<br /><br /><a href="http://ha.ckers.org/xss.html">bu siteden</a> tüm testleri yapabilirsiniz<br /><pre class="brush:php">function xss_clean($str)<br />   {<br /><br />       if (is_array($str) OR is_object($str))<br />        {<br />         foreach ($str as $k =&gt; $s)<br />         {<br />             $str[$k] = xss_clean($s);<br />         }<br /><br />           return $str;<br />      }<br /><br />       // Remove all NULL bytes<br />      $str = str_replace("", '', $str);<br /><br />       // Fix &amp;entityn;<br />      $str = str_replace(array('&amp;',''), array('&amp;',''), $str);<br />        $str = preg_replace('/(<em>w+)[x00-x20]+;/u', '$1;', $str);<br />      $str = preg_replace('/(</em>[0-9A-F]+);<em>/iu', '$1;', $str);<br />       //$str = html_entity_decode($str, ENT_COMPAT, $charset); //org<br />$str = html_entity_decode($str, ENT_COMPAT);<br />      // Remove any attribute starting with "on" or xmlns<br />       $str = preg_replace('#(?:on[a-z]+|xmlns)s</em>=s<em>['"x00-x20]?[^'&gt;"]</em>['"x00-x20]?s?#iu', '', $str);<br /><br />       // Remove javascript: and vbscript: protocols<br />     $str = preg_replace('#([a-z]<em>)[x00-x20]</em>=[x00-x20]<em>([`'"]</em>)[x00-x20]<em>j[x00-x20]</em>a[x00-x20]<em>v[x00-x20]</em>a[x00-x20]<em>s[x00-x20]</em>c[x00-x20]<em>r[x00-x20]</em>i[x00-x20]<em>p[x00-x20]</em>t[x00-x20]<em>:#iu', '$1=$2nojavascript...', $str);<br />      $str = preg_replace('#([a-z]</em>)[x00-x20]<em>=(['"]</em>)[x00-x20]<em>v[x00-x20]</em>b[x00-x20]<em>s[x00-x20]</em>c[x00-x20]<em>r[x00-x20]</em>i[x00-x20]<em>p[x00-x20]</em>t[x00-x20]<em>:#iu', '$1=$2novbscript...', $str);<br />     $str = preg_replace('#([a-z]</em>)[x00-x20]<em>=(['"]</em>)[x00-x20]<em>-moz-binding[x00-x20]</em>:#u', '$1=$2nomozbinding...', $str);<br /><br />        // Only works in IE: <br />     $str = preg_replace('#(]+?)style[x00-x20]<em>=[x00-x20]</em>[<code>'&quot;]*.*?expression[x00-x20]*([^&amp;gt;]*+&amp;gt;#is', '$1&amp;gt;', $str);&lt;br /&gt;        $str = preg_replace('#(]+?)style[x00-x20]*=[x00-x20]*[</code>'"]<em>.</em>?behaviour[x00-x20]<em>([^&gt;]</em>+&gt;#is', '$1&gt;', $str);<br />     $str = preg_replace('#(]+?)style[x00-x20]<em>=[x00-x20]</em>[`'"]<em>.</em>?s[x00-x20]<em>c[x00-x20]</em>r[x00-x20]<em>i[x00-x20]</em>p[x00-x20]<em>t[x00-x20]</em>:<em>[^&gt;]</em>+&gt;#ius', '$1&gt;', $str);<br /><br />      // Remove namespaced elements (we do not need them)<br />       $str = preg_replace('#<!--*w+:w[^-->]<em>+&gt;#i', '', $str);<br /><br />      do<br />        {<br />         // Remove really unwanted tags<br />            $old = $str;<br />          $str = preg_replace('#&lt;!--</em>(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^--&gt;]*+&gt;#i', '', $str);<br />        }<br />     while ($old !== $str);<br /><br />      return $str;<br />  }</pre></p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php türkçe tarih yazmak</title>
		<link>https://selmantunc.com.tr/uncategorized/php-turkce-tarih-yazmak/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:50:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/php-turkce-tarih-yazmak/</guid>

					<description><![CDATA[php türkçe tarih yazmak function hangi_gun_tr($date_){//echo date("l", mktime(0, 0, 0, $tim_par['ay'], $tim_par['gun'], $tim_par['yil']));$gunler = Array( "Monday" =&#62; "Pazartesi", "Tuesday" =&#62; "Salı", "Wednesday" =&#62; "Çarşamba", "Thursday" =&#62; "Perşembe", "Friday" =&#62; "Cuma",&#8230;]]></description>
										<content:encoded><![CDATA[<p>php türkçe tarih yazmak<br></p>
<pre class="brush:php"><br><br><br>function hangi_gun_tr($date_){<br>//echo date("l", mktime(0, 0, 0, $tim_par['ay'], $tim_par['gun'], $tim_par['yil']));<br><br>$gunler = Array(<br>     "Monday" =&gt; "Pazartesi",<br>       "Tuesday" =&gt; "Salı",<br>       "Wednesday" =&gt; "Çarşamba",<br>     "Thursday" =&gt; "Perşembe",<br>      "Friday" =&gt; "Cuma",<br>        "Saturday" =&gt; "Cumartesi",<br>     "Sunday" =&gt; "Pazar"<br>);<br>$aktif_gun = $date_;<br>return $gun=$gunler[$aktif_gun];<br>}<br><br>function hangi_ay_tr($date_){<br>        $aylar = Array(<br>       "01" =&gt; "Ocak",<br>        "02" =&gt; "Şubat",<br>       "03" =&gt; "Mart",<br>        "04" =&gt;  "Nisan",<br>      "05" =&gt;  "Mayıs",<br>      "06" =&gt;  "Haziran",<br>        "07" =&gt;  "Temmuz",<br>     "08" =&gt;  "Ağustos",<br>        "09" =&gt;  "Eylül",<br>      "10" =&gt;  "Ekim",<br>       "11" =&gt;  "Kasım",<br>      "12" =&gt;  "Aralık"<br>);<br><br>$aktif_ay = $date_;<br>return $ay=$aylar[$aktif_ay];<br>}<br><br>$aylar = Array(<br>      "01" =&gt; "Ocak",<br>        "02" =&gt; "Şubat",<br>       "03" =&gt; "Mart",<br>        "04" =&gt;  "Nisan",<br>      "05" =&gt;  "Mayıs",<br>      "06" =&gt;  "Haziran",<br>        "07" =&gt;  "Temmuz",<br>     "08" =&gt;  "Ağustos",<br>        "09" =&gt;  "Eylül",<br>      "10" =&gt;  "Ekim",<br>       "11" =&gt;  "Kasım",<br>      "12" =&gt;  "Aralık"<br>);<br><br>$gunler = Array(<br>      "Monday" =&gt; "Pazartesi",<br>       "Tuesday" =&gt; "Salı",<br>       "Wednesday" =&gt; "Çarşamba",<br>     "Thursday" =&gt; "Perşembe",<br>      "Friday" =&gt; "Cuma",<br>        "Saturday" =&gt; "Cumartesi",<br>     "Sunday" =&gt; "Pazar"<br>);<br><br>$aktif_ay = Date("m");<br>$ay=$aylar[$aktif_ay];<br><br>$aktif_gun = date("l");<br>$gun=$gunler[$aktif_gun];<br><br>$ayingun=date("j");<br>$yil=date("Y");<br>$zamani_ver=$ayingun.' '.$ay.' '.$gun.' '.$yil;</pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php basit bir takvim fonksiyonu</title>
		<link>https://selmantunc.com.tr/uncategorized/php-basit-bir-takvim-fonksiyonu/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:44:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/php-basit-bir-takvim-fonksiyonu/</guid>

					<description><![CDATA[php basit bir takvim fonksiyonu function showCalendar(){ // Get key day informations. // We need the first and last day of the month and the actual day $today = getdate();&#8230;]]></description>
										<content:encoded><![CDATA[<p>php basit bir takvim fonksiyonu<br></p>
<pre class="brush:php"><br><br>function showCalendar(){<br>    // Get key day informations.<br>    // We need the first and last day of the month and the actual day<br>  $today    = getdate();<br>    $firstDay = getdate(mktime(0,0,0,$today['mon'],1,$today['year']));<br>    $lastDay  = getdate(mktime(0,0,0,$today['mon']+1,0,$today['year']));<br><br>    // Create a table with the necessary header informations<br><br>    // Display the first calendar row with correct positioning<br>    echo '<br><br>';<br>  if ($firstDay['wday'] == 0) $firstDay['wday'] = 7;<br>    for($i=1;$i&lt;$firstDay[&#039;wday&#039;];$i++){<br /><br>    }<br> $actday = 0;<br>  for($i=$firstDay['wday'];$i&lt;=7;$i++){<br />     $actday++;<br>        if ($actday == $today['mday']) {<br>          $class = ' class="event"';<br>        } else {<br>          $class = '';<br>      }<br>     echo '<br><a href="#"> '.$actday.' </a>
<br>';<br>  }<br><br>   //Get how many complete weeks are in the actual month<br> $fullWeeks = floor(($lastDay['mday']-$actday)/7);<br><br>   for ($i=0;$i&lt;$fullWeeks;$i++){<br />        //echo '<br>';<br>      for ($j=0;$j&lt;7;$j++){<br />         $actday++;<br>            if ($actday == $today['mday']) {<br>              $class = ' class="event"';<br>            } else {<br>              $class = '';<br>          }<br>             echo '<br><a href="#"> '.$actday.' </a>
<br>';<br>      }<br><br>   }<br><br>   //Now display the rest of the month<br>   if ($actday &lt; $lastDay[&#039;mday&#039;]){<br><br>     for ($i=0; $i&lt;7;$i++){<br />            $actday++;<br>            if ($actday == $today['mday']) {<br>              $class = ' class="event"';<br>            } else {<br>              $class = '';<br>          }<br><br>           if ($actday &lt;= $lastDay[&#039;mday&#039;]){<br />     echo '<br><a href="#"> '.$actday.' </a>
<br>';<br>          }<br>         else {<br><br>          }<br>     }<br><br>   }<br><br>}</pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php devamını gör</title>
		<link>https://selmantunc.com.tr/uncategorized/php-devamini-gor/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:42:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/php-devamini-gor/</guid>

					<description><![CDATA[php devamını gör function devamini_gor ($text,$bolunecek_aralik=''){ $adet=strlen($text); $bolunecek_aralik =($bolunecek_aralik=='') ? floor($adet/2) : $bolunecek_aralik;//boş gelirse tam ortadan 2 ye bol if ($adet &#62; $bolunecek_aralik){ //$yarisi = floor($adet/2) ;//tam oratadan ikiye ayırır&#8230;]]></description>
										<content:encoded><![CDATA[<p>php devamını gör </p>
<pre class="brush:php">  function devamini_gor ($text,$bolunecek_aralik=''){<br>       $adet=strlen($text);<br>      $bolunecek_aralik =($bolunecek_aralik=='') ?  floor($adet/2) : $bolunecek_aralik;//boş gelirse tam ortadan 2 ye bol <br>          if ($adet &gt; $bolunecek_aralik){<br>         //$yarisi = floor($adet/2) ;//tam oratadan ikiye ayırır<br>      $yarisi =$bolunecek_aralik;//<br>        $birinci = mb_substr( $text, 0, $yarisi,'utf-8'); <br>        $ikinci =  mb_substr( $text, $yarisi, $adet,'utf-8');<br>              return  $result= $birinci .''.$ikinci .''; }<br>      else { return  $result=$text ;} }      </pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>geçerli sayfanın tam adını bulmak</title>
		<link>https://selmantunc.com.tr/uncategorized/gecerli-sayfanin-tam-adini-bulmak/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:40:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/gecerli-sayfanin-tam-adini-bulmak/</guid>

					<description><![CDATA[php de geçerli sayfanın tam adını bulmak function curPageURL() {$pageURL = 'http';if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}$pageURL .= "://";if ($_SERVER["SERVER_PORT"] != "80") {$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];} else {$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];}return&#8230;]]></description>
										<content:encoded><![CDATA[<p>php de geçerli sayfanın tam adını bulmak <br></p>
<pre class="brush:php">function curPageURL() {<br>$pageURL = 'http';<br>if ($_SERVER["HTTPS"] == "on") {<br>$pageURL .= "s";<br>}<br>$pageURL .= "://";<br>if ($_SERVER["SERVER_PORT"] != "80") {<br>$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];<br>} else {<br>$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];<br>}<br>return $pageURL;<br>}</pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php sona ek yapma olayı</title>
		<link>https://selmantunc.com.tr/uncategorized/php-sona-ek-yapma-olayi/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:39:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/php-sona-ek-yapma-olayi/</guid>

					<description><![CDATA[kullanımı sondadırnot path info bazı sunucularda çalışmamakdadır3497_70956_29737ek.pngsonuç :3497_70956_29737ek_thumb.png function dosya_sonek_ekle($dosya_adi,$uzanti) {$file_info = pathinfo($dosya_adi);$dosya_adim = $file_info['filename'];$ext = '.'.$file_info['extension'];return $result = $dosya_adim.$uzanti.$ext;}dosya_sonek_ekle("3497_70956_29737ek.png","_thumb");]]></description>
										<content:encoded><![CDATA[<p>kullanımı sondadır<br><br>not path info bazı sunucularda çalışmamakdadır<br><br>3497_70956_29737ek.png<br>sonuç :3497_70956_29737ek_thumb.png<br></p>
<pre class="php">function dosya_sonek_ekle($dosya_adi,$uzanti) {<br>$file_info = pathinfo($dosya_adi);<br>$dosya_adim = $file_info['filename'];<br>$ext = '.'.$file_info['extension'];<br>return $result = $dosya_adim.$uzanti.$ext;<br>}<br>dosya_sonek_ekle("3497_70956_29737ek.png","_thumb");</pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>php türkçe ascii kodları</title>
		<link>https://selmantunc.com.tr/uncategorized/php-turkce-ascii-kodlari/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 14 Jun 2012 18:37:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php ipuçları]]></category>
		<guid isPermaLink="false">http://selmantunc.com.tr/2012/06/14/php-turkce-ascii-kodlari/</guid>

					<description><![CDATA[php türkçe ascii kodları function tr_ascii($text) { $search = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç", "ı", "ğ", "ö", "ş", "ü"); $replace = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç",&#8230;]]></description>
										<content:encoded><![CDATA[<p>php türkçe ascii kodları<br></p>
<pre class="brush:php">function tr_ascii($text) {<br> $search = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç", "ı", "ğ", "ö", "ş", "ü");<br>  $replace = array("Ç", "İ", "Ğ", "Ö", "Ş", "Ü", "ç", "ı", "ğ", "ö", "ş", "ü");<br> $text = str_replace($search, $replace, $text);<br>    return $text;<br>}</pre>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
