<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>KingPhp</title>
	<link>http://kingphp.com</link>
	<description></description>
	<pubDate>Fri, 25 Jul 2008 18:19:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Redirect by PC or mobile access</title>
		<link>http://kingphp.com/41.html</link>
		<comments>http://kingphp.com/41.html#comments</comments>
		<pubDate>Fri, 25 Jul 2008 17:10:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Code]]></category>

		<guid isPermaLink="false">http://kingphp.com/41.html</guid>
		<description><![CDATA[php code as follows:
$iswap = isset($_SERVER[&#8217;HTTP_ACCEPT&#8217;])? $_SERVER[&#8217;HTTP_ACCEPT&#8217;]:&#8221;;
if(strpos($iswap,&#8221;wap&#8221;)>0)
{
        @header(&#8221;Location: /wap/&#8221;);
}
]]></description>
			<content:encoded><![CDATA[<p>php code as follows:</p>
<p>$iswap = isset($_SERVER[&#8217;HTTP_ACCEPT&#8217;])? $_SERVER[&#8217;HTTP_ACCEPT&#8217;]:&#8221;;<br />
if(strpos($iswap,&#8221;wap&#8221;)>0)<br />
{<br />
        @header(&#8221;Location: /wap/&#8221;);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/41.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Add php code into html for lunarpage.com</title>
		<link>http://kingphp.com/40.html</link>
		<comments>http://kingphp.com/40.html#comments</comments>
		<pubDate>Fri, 25 Jul 2008 16:22:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Code]]></category>

		<category><![CDATA[Php Skills]]></category>

		<guid isPermaLink="false">http://kingphp.com/40.html</guid>
		<description><![CDATA[Add php code into html for lunarpage.com  linux host.
try this line in a blank .htaccess
AddType application/x-httpd-php php html
]]></description>
			<content:encoded><![CDATA[<p>Add php code into html for lunarpage.com  linux host.</p>
<p>try this line in a blank .htaccess</p>
<p><code>AddType application/x-httpd-php php html</code></p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/40.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Add php code into html for php5</title>
		<link>http://kingphp.com/39.html</link>
		<comments>http://kingphp.com/39.html#comments</comments>
		<pubDate>Thu, 03 Jul 2008 10:35:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Code]]></category>

		<category><![CDATA[Php Skills]]></category>

		<guid isPermaLink="false">http://kingphp.com/39.html</guid>
		<description><![CDATA[AddType application/x-httpd-php5 .html .htm .php
AddHandler application/x-httpd-php5 .html .htm .php
]]></description>
			<content:encoded><![CDATA[<p>AddType application/x-httpd-php5 .html .htm .php<br />
AddHandler application/x-httpd-php5 .html .htm .php</p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/39.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Load different pictures each time.</title>
		<link>http://kingphp.com/38.html</link>
		<comments>http://kingphp.com/38.html#comments</comments>
		<pubDate>Wed, 25 Jun 2008 04:16:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://kingphp.com/38.html</guid>
		<description><![CDATA[Just add the following codes within the body:
 
var how_many_ads = 5
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1; 
if (ad==1){
url="http://kingphp.com";
alt="ad1";
banner="img/ad1.jpg";
width="240";
height="320";
} 
if (ad==2) {
url="http://kingphp.com";
alt="ad2";
banner="img/ad2.jpg";
width="240";
height="320";
} 
if (ad==3) {
url="http://kingphp.com";
alt="ad3";
banner="img/ad3.jpg";
width="240";
height="320";
}
if (ad==4) {
url="http://kingphp.com";
alt="ad4";
banner="img/ad4.jpg";
width="240";
height="320";
}  
if (ad==5) {
url="http://kingphp.com";
alt="ad5";
banner="img/ad5.jpg";
width="240";
height="320";
}  
document.write('&#8216;);
document.write(&#8217;&#8216;);
document.write(&#8217;]]></description>
			<content:encoded><![CDATA[<p>Just add the following codes within the body:</p>
<p><script language="JavaScript"> </p>
<p>var how_many_ads = 5<br />
var now = new Date()<br />
var sec = now.getSeconds()<br />
var ad = sec % how_many_ads;<br />
ad +=1; </p>
<p>if (ad==1){<br />
url="http://kingphp.com";<br />
alt="ad1";<br />
banner="img/ad1.jpg";<br />
width="240";<br />
height="320";<br />
} </p>
<p>if (ad==2) {<br />
url="http://kingphp.com";<br />
alt="ad2";<br />
banner="img/ad2.jpg";<br />
width="240";<br />
height="320";<br />
} </p>
<p>if (ad==3) {<br />
url="http://kingphp.com";<br />
alt="ad3";<br />
banner="img/ad3.jpg";<br />
width="240";<br />
height="320";<br />
}</p>
<p>if (ad==4) {<br />
url="http://kingphp.com";<br />
alt="ad4";<br />
banner="img/ad4.jpg";<br />
width="240";<br />
height="320";<br />
}  </p>
<p>if (ad==5) {<br />
url="http://kingphp.com";<br />
alt="ad5";<br />
banner="img/ad5.jpg";<br />
width="240";<br />
height="320";<br />
}  </p>
<p>document.write('<center>&#8216;);<br />
document.write(&#8217;<a href=\"' + url + '\" target=\"_blank\">&#8216;);<br />
document.write(&#8217;<img src=\&#8221;&#8216; + banner + &#8216;\&#8221; width=&#8217;) </p>
<p>That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/38.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Javascript Changing Picture</title>
		<link>http://kingphp.com/37.html</link>
		<comments>http://kingphp.com/37.html#comments</comments>
		<pubDate>Wed, 25 Jun 2008 04:11:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://kingphp.com/37.html</guid>
		<description><![CDATA[Ad the following code between head:
 
 


add the following code in the body:

nextAd()
That&#8217;s all.
]]></description>
			<content:encoded><![CDATA[<p>Ad the following code between head:</p>
<p><script language=JavaScript> 
<!-- 
var pic_ar=new Array(); 
var pic_arlink=new Array(); 
var adNum=0; 
pic_ar[0]="img/ad1.jpg"; 
pic_ar[1]="img/ad2.jpg"; 
pic_ar[2]="img/ad3.jpg"; 
pic_ar[3]="img/ad4.jpg"; 
pic_ar[4]="img/ad5.jpg"; 
pic_ar[5]="img/ad6.jpg"; 
pic_ar[6]="img/ad7.jpg"; 
pic_ar[7]="img/ad8.jpg"; 
pic_ar[8]="img/ad9.jpg"; 
pic_ar[9]="img/ad10.jpg"; 
pic_ar[10]="img/ad11.jpg"; 
pic_ar[11]="img/ad12.jpg"; 
var preloadedimages=new Array(); 
for (i=1;i
<pic_ar.length;i++){ 
preloadedimages[i]=new Image(); 
preloadedimages[i].src=pic_ar[i]; 
} 
function setTransition(){ 
if (document.all){ 
pic_arrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23); 
pic_arrotator.filters.revealTrans.apply(); 
} 
} 
function playTransition(){ 
if (document.all) 
pic_arrotator.filters.revealTrans.play() 
} 
function nextAd(){ 
if(adNum<pic_ar.length-1)adNum++ ; 
else adNum=0; 
setTransition(); 
document.images.pic_arrotator.src=pic_ar[adNum]; 
playTransition(); 
theTimer=setTimeout("nextAd()", 5000); 
} 
function displayStatusMsg() { 
status=pic_arlink[adNum]; 
document.returnValue = true; 
} 
//--> 
</script><br />
</--more--><br />
add the following code in the body:</p>
<p style="text-align:center;text-indent:0"><IMG style="FILTER: revealTrans(duration=2,transition=20);border:1px solid #ccc" height=320 src="img/ad1.jpg" width="240" border="1" name="pic_arrotator"></p>
<p><script language=JavaScript>nextAd()</script></p>
<p>That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/37.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>PHP to detect mobile phones</title>
		<link>http://kingphp.com/36.html</link>
		<comments>http://kingphp.com/36.html#comments</comments>
		<pubDate>Sat, 07 Jun 2008 21:25:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Code]]></category>

		<guid isPermaLink="false">http://kingphp.com/36.html</guid>
		<description><![CDATA[The most efficient way to detect mobile phones with PHP, this simply queries the accept headers, the user agent and checks for any tell tale signs that the browser we’re sniffing is a mobile device.
]]></description>
			<content:encoded><![CDATA[<p>The most efficient way to detect mobile phones with PHP, this simply queries the accept headers, the user agent and checks for any tell tale signs that the browser we’re sniffing is a mobile device. <a href="http://kingphp.com/36.html#more-36" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/36.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to remove the special characters in title?</title>
		<link>http://kingphp.com/35.html</link>
		<comments>http://kingphp.com/35.html#comments</comments>
		<pubDate>Sat, 17 May 2008 15:08:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Learning]]></category>

		<guid isPermaLink="false">http://kingphp.com/35.html</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><?php<br />
$hotel="  How       to study; PHP?  ";<br />
$foldername = stripslashes ($hotel);<br />
//This erase white-spaces on the beginning and the end in each line of a string:<br />
$foldername = preg_replace('~^(\s*)(.*?)(\s*)$~m', "\\2", $foldername);<br />
//erases all NON-alfanumerics<br />
$foldername = ereg_replace("[^[:alnum:] ]","",$foldername); <a href="http://kingphp.com/35.html#more-35" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/35.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>how to deal with a sentence as a page title?</title>
		<link>http://kingphp.com/34.html</link>
		<comments>http://kingphp.com/34.html#comments</comments>
		<pubDate>Sat, 17 May 2008 11:12:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Skills]]></category>

		<guid isPermaLink="false">http://kingphp.com/34.html</guid>
		<description><![CDATA[&#60;?php
$hotel=&#8221;  How to study PHP  &#8220;;
$hotel= trim($hotel);
$array=explode(&#8221; &#8220;, $hotel);
$hotel=implode(&#8221;-&#8221;, $array);
echo ($hotel);
?&#62;
]]></description>
			<content:encoded><![CDATA[<p>&lt;?php<br />
$hotel=&#8221;  How to study PHP  &#8220;;<br />
$hotel= trim($hotel);<br />
$array=explode(&#8221; &#8220;, $hotel);</p>
<p>$hotel=implode(&#8221;-&#8221;, $array);<br />
echo ($hotel);<br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/34.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to change phpld title seperator</title>
		<link>http://kingphp.com/33.html</link>
		<comments>http://kingphp.com/33.html#comments</comments>
		<pubDate>Sun, 11 May 2008 03:17:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Link Directory]]></category>

		<guid isPermaLink="false">http://kingphp.com/33.html</guid>
		<description><![CDATA[Want to  change the seperator between categories in the title tag?
At the moment the phpld generate the title as:
home - category - category - category
]]></description>
			<content:encoded><![CDATA[<p>Want to  change the seperator between categories in the title tag?</p>
<p>At the moment the phpld generate the title as:<br />
home - category - category - category<br />
 <a href="http://kingphp.com/33.html#more-33" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/33.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Get current url</title>
		<link>http://kingphp.com/32.html</link>
		<comments>http://kingphp.com/32.html#comments</comments>
		<pubDate>Sun, 04 May 2008 16:02:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Php Code]]></category>

		<guid isPermaLink="false">http://kingphp.com/32.html</guid>
		<description><![CDATA[&#60;?php
//get the current page URL that is shown in the browser URL window
function curPageURL() {
 $pageURL = &#8216;http&#8217;;
 if ($_SERVER[&#8221;HTTPS&#8221;] == &#8220;on&#8221;) {$pageURL .= &#8220;s&#8221;;}
 $pageURL .= &#8220;://&#8221;;
 if ($_SERVER[&#8221;SERVER_PORT&#8221;] != &#8220;80&#8243;) {
  $pageURL .= $_SERVER[&#8221;SERVER_NAME&#8221;].&#8221;:&#8221;.$_SERVER[&#8221;SERVER_PORT&#8221;].$_SERVER[&#8221;REQUEST_URI&#8221;];
]]></description>
			<content:encoded><![CDATA[<p>&lt;?php<br />
//get the current page URL that is shown in the browser URL window</p>
<p>function curPageURL() {<br />
 $pageURL = &#8216;http&#8217;;<br />
 if ($_SERVER[&#8221;HTTPS&#8221;] == &#8220;on&#8221;) {$pageURL .= &#8220;s&#8221;;}<br />
 $pageURL .= &#8220;://&#8221;;<br />
 if ($_SERVER[&#8221;SERVER_PORT&#8221;] != &#8220;80&#8243;) {<br />
  $pageURL .= $_SERVER[&#8221;SERVER_NAME&#8221;].&#8221;:&#8221;.$_SERVER[&#8221;SERVER_PORT&#8221;].$_SERVER[&#8221;REQUEST_URI&#8221;]; <a href="http://kingphp.com/32.html#more-32" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kingphp.com/32.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
