<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Patelkiranat1983's Weblog</title>
	<atom:link href="http://patelkiranat1983.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://patelkiranat1983.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 24 Dec 2007 09:48:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='patelkiranat1983.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Patelkiranat1983's Weblog</title>
		<link>http://patelkiranat1983.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://patelkiranat1983.wordpress.com/osd.xml" title="Patelkiranat1983&#039;s Weblog" />
	<atom:link rel='hub' href='http://patelkiranat1983.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Photolisting Logic In PHP</title>
		<link>http://patelkiranat1983.wordpress.com/2007/12/24/photolisting-logic-in-php/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/12/24/photolisting-logic-in-php/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 09:48:05 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/12/24/photolisting-logic-in-php/</guid>
		<description><![CDATA[&#60;table width=&#8221;89%&#8221; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&#62; &#60;tr&#62; &#60;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&#62;  &#60;table width=&#8221;100%&#8221; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&#62;  &#60;?  $cntr = 1;  $qry = &#8220;select * from products&#8221;;  $indexbody=&#8221;;  $rs_qry = mysql_query($qry);  $num=mysql_num_rows($rs_qry);  while($fetch = mysql_fetch_array($rs_qry))  {   $pid = $fetch['product_id'];   $image = &#8220;../gallery/&#8221;.$fetch['image'];   $title = $fetch['title'];   if($cntr%4 == 1)   $indexbody.=&#8217;&#60;tr&#62;&#8217;;   $indexbody.=&#8217;&#60;td align=&#8221;center&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&#62;&#60;br&#62;&#60;table width=&#8221;100%&#8221; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&#62;&#60;tr&#62;&#8217;; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=20&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;table width=&#8221;89%&#8221; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;</p>
<p> &lt;table width=&#8221;100%&#8221; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&gt;<br />
 &lt;?<br />
 $cntr = 1;<br />
 $qry = &#8220;select * from products&#8221;;<br />
 $indexbody=&#8221;;<br />
 $rs_qry = mysql_query($qry);<br />
 $num=mysql_num_rows($rs_qry);<br />
 while($fetch = mysql_fetch_array($rs_qry))<br />
 {<br />
  $pid = $fetch['product_id'];<br />
  $image = &#8220;../gallery/&#8221;.$fetch['image'];<br />
  $title = $fetch['title'];</p>
<p>  if($cntr%4 == 1)<br />
  $indexbody.=&#8217;&lt;tr&gt;&#8217;;<br />
  $indexbody.=&#8217;&lt;td align=&#8221;center&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;br&gt;&lt;table width=&#8221;100%&#8221; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&gt;&lt;tr&gt;&#8217;;<br />
  $indexbody.=&#8217;&lt;td&gt;&lt;img src=&#8221;&#8216;.$image.&#8217;&#8221; mce_src=&#8221;&#8216;.$image.&#8217;&#8221; width=&#8221;110&#8243; height=&#8221;147&#8243; class=&#8221;Border_Img&#8221; alt=&#8221;&#8216;.ucwords($title).&#8217;&#8221;&gt;&#8217;;<br />
  $indexbody.=&#8217;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height=&#8221;30&#8243; align=&#8221;center&#8221; valign=&#8221;top&#8221; class=&#8221;Text_ProductsBold&#8221;&gt;&lt;br&gt;&#8217;.ucwords($title).&#8217;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&#8217;;<br />
  $indexbody.=&#8217;&lt;td align=&#8221;center&#8221; valign=&#8221;top&#8221;&gt;&lt;input name=&#8221;submit&#8221; type=&#8221;submit&#8221; value=&#8221;Update&#8221; class=&#8221;but&#8221; style=&#8221;width:50px;&#8221; onclick=&#8221;setAction(\&#8217;edit\&#8217;);&#8221;&gt;  &lt;input name=&#8221;submit&#8221; type=&#8221;submit&#8221; value=&#8221;Delete&#8221; class=&#8221;but&#8221; style=&#8221;width:50px;&#8221;/&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#8217;;<br />
 <br />
  if($cntr == ($num-1))<br />
  {<br />
   if($cntr%4 == 0)<br />
    $indexbody.=&#8217;&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;/td&gt;&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;/td&gt;&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;/td&gt;&#8217;;<br />
   if($cntr%4 == 1)<br />
    $indexbody.=&#8217;&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;/td&gt;&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;/td&gt;&#8217;; <br />
   if($cntr%4 == 2)<br />
    $indexbody.=&#8217;&lt;td width=&#8221;25%&#8221; valign=&#8221;top&#8221; class=&#8221;Body_Text&#8221;&gt;&lt;/td&gt;&#8217;; <br />
  }<br />
  if($cntr%4 == 0)<br />
   $indexbody.=&#8217;&lt;/tr&gt;&#8217;;<br />
  $cntr++;<br />
 }<br />
echo $indexbody.&#8221;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&#8221;;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=20&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/12/24/photolisting-logic-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>IMP Javascripts Functions</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/31/imp-javascripts-functions/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/31/imp-javascripts-functions/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 07:36:03 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/31/imp-javascripts-functions/</guid>
		<description><![CDATA[* Description: * check on key down whether the value is numeric or not. * function numbersonly(evt) { evt = (evt) ? evt: window.event; // Detect issuing element. var srcElt = (evt.target) ? evt.target : evt.srcElement; var unicode = evt.charCode? evt.charCode : evt.keyCode; if (unicode != { //if the key isn&#8217;t the backspace key (which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=17&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>* Description:<br />
* check on key down whether the value is numeric or not.<br />
*<br />
function numbersonly(evt) {</p>
<p>evt = (evt) ? evt: window.event;<br />
// Detect issuing element.<br />
var srcElt = (evt.target) ? evt.target : evt.srcElement;</p>
<p>var unicode = evt.charCode? evt.charCode : evt.keyCode;</p>
<p>if (unicode != <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> { //if the key isn&#8217;t the backspace key (which we should allow)<br />
if (unicode &lt; 48 || unicode &gt; 57) { //if not a number<br />
srcElt.value = &#8221;;<br />
return false //disable key press<br />
}<br />
}</p>
<p>return true;<br />
}// End function: numbersonly.<br />
  /*<br />
* Name:<br />
* limitlength<br />
*/<br />
function limitlength(obj, length) {</p>
<p>var maxlength = length;</p>
<p>if (obj.value.length &gt; maxlength) {<br />
obj.value = obj.value.substring(0, maxlength);<br />
}<br />
}//End of function limitlength<br />
  /*<br />
* Description:<br />
* Get the javascript object. useful when some times explore not support document.getElementById()<br />
* It is not used in this file yet. but if required then we can used this function to create the javascript object.<br />
*/<br />
function getElement(obj, d) {<br />
var i,x;</p>
<p>if(!d) d=document;</p>
<p>if(!(x=d[obj])&amp;&amp;d.all)<br />
x=d.all[obj];</p>
<p>for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++)<br />
x=d.forms[i][obj];</p>
<p>for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++)<br />
x=GetElement(obj,d.layers[i].document);</p>
<p>if(!x &amp;&amp; document.getElementById)<br />
x=document.getElementById(obj);</p>
<p>return x;<br />
}// End function: getElement.<br />
  /*<br />
* Description:<br />
* Convert a first character of string as capital letter.<br />
*<br />
*/<br />
function ucFirst(strArg) {<br />
var charFirst = strArg.charAt(0);</p>
<p>if (parseInt(strArg.length)==1){<br />
return charFirst.toUpperCase();<br />
}<br />
else<br />
{<br />
return charFirst.toUpperCase() + strArg.slice(1).toLowerCase();<br />
}<br />
}// End function: ucFirst.<br />
  /*<br />
* Description:<br />
* This return the whole string ## seperator with the set of property on passed control.<br />
* It is used for debugging purpose so, we can see which property is set to the particular object.<br />
* but for style property it is working fine in mozill but display null value in internet explorer<br />
*/<br />
function getAttributes(countrolObj) {<br />
var propartyValues = &#8221;;</p>
<p>//it reads the tag one by one elements and create the corosponding hidden varaible in array&#8230;&#8230;<br />
for(var i=0;i&lt;countrolObj.attributes.length;i++) {<br />
if(countrolObj.attributes[i].specified) {<br />
propartyValues += countrolObj.attributes[i].nodeName + &#8220;=&#8221; + countrolObj.attributes[i].nodeValue + &#8216;##&#8217;;<br />
}<br />
}</p>
<p>if(propartyValues) {<br />
alert(&#8216;All property with ## seperator ==&gt; &#8216;);<br />
alert(propartyValues);<br />
}</p>
<p>return propartyValues;<br />
} // End function: getAttributes.<br />
12:44 PM /*<br />
* Description:<br />
* For checking the variable is object type or not.<br />
*<br />
*/<br />
function isObject(a) {<br />
return (a &amp;&amp; typeof a == &#8216;object&#8217;) || isFunction(a);<br />
} // End function: isObject.<br />
function isFunction(a) {<br />
return typeof a == &#8216;function&#8217;;<br />
} // End function: isFunction.<br />
  /*<br />
* Description:<br />
* Return the given text with the following HTML entities escaped:<br />
* ampersand, single-quote, double-quote, angled brackets.<br />
*/<br />
function htmlEntitizeText(text) {<br />
// Make sure ampersands are replaced FIRST, otherwise the ampersands of<br />
// the escaped entities will themselves be escaped.<br />
text = text.replace(/\&amp;/g, &#8216;&amp;&#8217;);<br />
text = text.replace(/\&#8221;/g, &#8216;&#8221;&#8216;);<br />
// The standard &#8220;&amp;apos;&#8221; is broken for some versions<br />
// of IE. Use numeric entity replacement instead.<br />
text = text.replace(/\&#8217;/g, &#8221;&#8217;);<br />
text = text.replace(/\&lt;/g, &#8216;&lt;&#8217;);<br />
text = text.replace(/\&gt;/g, &#8216;&gt;&#8217;);</p>
<p>return text;<br />
} // End function: htmlEntitizeText.</p>
<p>function textToHtmlEntities(text) {<br />
// Make sure ampersands are replaced FIRST, otherwise the ampersands of<br />
// the escaped entities will themselves be escaped.<br />
text = text.replace(/\&amp;/g, &#8216;&amp;&#8217;);<br />
text = text.replace(/\&#8221;/g, &#8216;&#8221;&#8216;);<br />
// The standard &#8220;&amp;apos;&#8221; is broken for some versions<br />
// of IE. Use numeric entity replacement instead.<br />
text = text.replace(/\&#8217;/g, &#8220;&#8216;&#8221;);<br />
text = text.replace(/\&lt;/g, &#8216;&lt;&#8217;);<br />
text = text.replace(/\&gt;/g, &#8216;&gt;&#8217;);</p>
<p>return text;<br />
} // End function: htmlEntitizeText.<br />
  *************</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=17&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/31/imp-javascripts-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP And CURL</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/php-and-curl/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/php-and-curl/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 11:16:47 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/php-and-curl/</guid>
		<description><![CDATA[&#60;? $cURL = curl_init(); curl_setopt($cURL, CURLOPT_URL,&#8221;http://www.hiddenbrains.com&#8221;); curl_setopt($cURL, CURLOPT_POST, 1); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cURL, CURLOPT_POSTFIELDS, &#8220;foo=1&#38;bar=2&#8243;); $strPage = curl_exec($cURL); curl_close($cURL); // Output page die($strPage); //echo $strPage; ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=16&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;?<br />
$cURL = curl_init();<br />
curl_setopt($cURL, CURLOPT_URL,&#8221;http://www.hiddenbrains.com&#8221;);<br />
curl_setopt($cURL, CURLOPT_POST, 1);<br />
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);<br />
curl_setopt($cURL, CURLOPT_POSTFIELDS, &#8220;foo=1&amp;bar=2&#8243;);<br />
$strPage = curl_exec($cURL);<br />
curl_close($cURL);</p>
<p>// Output page<br />
die($strPage);<br />
//echo $strPage;<br />
?&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=16&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/php-and-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascripts : get mouse position</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/javascripts-get-mouse-position/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/javascripts-get-mouse-position/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 08:03:54 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/javascripts-get-mouse-position/</guid>
		<description><![CDATA[function posicion_mouse(e) { var posx = 0; var posy = 0; if(!e){ var e = window.event } posx = (e.pageX) ? e.pageX : window.event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = (e.pageY) ? e.pageY : window.event.clientY + document.body.scrollTop + document.documentElement.scrollTop; return {y: posy, x:posx} }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=15&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight:bold;color:#003366;">function</span>  posicion_mouse<span style="color:#66cc66;">(</span>e<span style="color:#66cc66;">)</span> <span style="color:#66cc66;">{</span><br />
<span style="font-weight:bold;color:#003366;">var</span> posx = <span style="color:#cc0000;">0</span>;<br />
<span style="font-weight:bold;color:#003366;">var</span> posy = <span style="color:#cc0000;">0</span>;<br />
<span style="font-weight:bold;color:#000066;">if</span><span style="color:#66cc66;">(</span>!e<span style="color:#66cc66;">)</span><span style="color:#66cc66;">{</span> <span style="font-weight:bold;color:#003366;">var</span> e = window.<span style="color:#006600;">event</span> <span style="color:#66cc66;">}</span></p>
<p>posx = <span style="color:#66cc66;">(</span>e.<span style="color:#006600;">pageX</span><span style="color:#66cc66;">)</span> ? e.<span style="color:#006600;">pageX</span> :  window.<span style="color:#006600;">event</span>.<span style="color:#006600;">clientX</span> + document.<span style="color:#006600;">body</span>.<span style="color:#006600;">scrollLeft</span> + document.<span style="color:#006600;">documentElement</span>.<span style="color:#006600;">scrollLeft</span>;<br />
posy = <span style="color:#66cc66;">(</span>e.<span style="color:#006600;">pageY</span><span style="color:#66cc66;">)</span> ? e.<span style="color:#006600;">pageY</span> :  window.<span style="color:#006600;">event</span>.<span style="color:#006600;">clientY</span> + document.<span style="color:#006600;">body</span>.<span style="color:#006600;">scrollTop</span>  + document.<span style="color:#006600;">documentElement</span>.<span style="color:#006600;">scrollTop</span>;</p>
<p><span style="font-weight:bold;color:#000066;">return</span> <span style="color:#66cc66;">{</span>y: posy, x:posx<span style="color:#66cc66;">}</span><br />
<span style="color:#66cc66;">}</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=15&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/javascripts-get-mouse-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>List Of good Site Name</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/list-of-good-site-name/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/list-of-good-site-name/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 08:00:52 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/list-of-good-site-name/</guid>
		<description><![CDATA[//////// For good Coding //////////// http://www.bytemycode.com/ http://www.the-art-of-web.com/ //////////////////////////////////////////////////////////////////////// ////////////////////////// Start IMP LINKS ///////////////////////////// //////////////////////////////////////////////////////////////////////// Hi kiran, Below are the links that you want. //////////////////////////////////////////////////////////////////////// http://www.w3schools.com/tags/tag_dl.asp [for html, javascript, and all other] http://www.htmlcodetutorial.com/ [for html, javascript, and all other] ///////////////////////FREE_E_BOOK http://safari.oreilly.com/067232542X/ch03lev1sec7 http://portal.aauj.edu/portal_resources/downloads/web/asp_dot_net.pdf ////////////////Reg Expression http://weblogtoolscollection.com/regex/regex.php /////////////////////////// AJAX ////////////////////////////////// http://www.dhtmlgoodies.com/index.html http://chronotron.wordpress.com/2006/04/11/ajax-get-started-resources-tutorials/ http://www.google.co.in/search?hl=en&#038;q=css+%2B+div+%2B+scrollbar+%2B+FF&#038;meta= http://www.hotscripts.com/PHP/Scripts_and_Programs/Chat_Scripts/index.html http://www.walterzorn.com/dragdrop/dragdrop_e.htm http://www.javascriptkit.com/domref/ http://www.howtocreate.co.uk/tutorials/javascript/domstructure http://www.e-magine.ro/web-dev-and-design/36/moodalbox/?adadasd=&#038;sfdsf=# [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=14&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>//////// For good Coding ////////////</p>
<p>http://www.bytemycode.com/</p>
<p>http://www.the-art-of-web.com/</p>
<p>////////////////////////////////////////////////////////////////////////<br />
////////////////////////// Start IMP LINKS /////////////////////////////<br />
////////////////////////////////////////////////////////////////////////<br />
Hi kiran,</p>
<p>Below are the links that you want.<br />
////////////////////////////////////////////////////////////////////////<br />
http://www.w3schools.com/tags/tag_dl.asp [for html, javascript, and all other]<br />
http://www.htmlcodetutorial.com/ [for html, javascript, and all other]<br />
///////////////////////FREE_E_BOOK</p>
<p>http://safari.oreilly.com/067232542X/ch03lev1sec7</p>
<p>http://portal.aauj.edu/portal_resources/downloads/web/asp_dot_net.pdf</p>
<p>////////////////Reg Expression</p>
<p>http://weblogtoolscollection.com/regex/regex.php</p>
<p>///////////////////////////     AJAX   //////////////////////////////////</p>
<p>http://www.dhtmlgoodies.com/index.html</p>
<p>http://chronotron.wordpress.com/2006/04/11/ajax-get-started-resources-tutorials/</p>
<p>http://www.google.co.in/search?hl=en&#038;q=css+%2B+div+%2B+scrollbar+%2B+FF&#038;meta=</p>
<p>http://www.hotscripts.com/PHP/Scripts_and_Programs/Chat_Scripts/index.html</p>
<p>http://www.walterzorn.com/dragdrop/dragdrop_e.htm</p>
<p>http://www.javascriptkit.com/domref/</p>
<p>http://www.howtocreate.co.uk/tutorials/javascript/domstructure</p>
<p>http://www.e-magine.ro/web-dev-and-design/36/moodalbox/?adadasd=&#038;sfdsf=#</p>
<p>http://ajaxpatterns.org/PHP_Ajax_Frameworks#PHPLiveX</p>
<p>http://www.php-sites.com/scripts,php,linki,36</p>
<p>http://www.php-sites.com/scripts,php,linki,47</p>
<p>http://www.opensourcecms.com/index.php?option=content&#038;task=view&#038;id=547</p>
<p>&amp;Itemid=159</p>
<p>https://sourceforge.net/project/showfiles.php?group_id=19371</p>
<p>/////////////////////////////////////            CURL           //////////////////////////////////////////////////////////</p>
<p>http://curl.phptrack.com/forum/viewtopic.php?p=685&#038;sid=c9ebc3b2fcdeecf6</p>
<p>d0af5af4b86b0788</p>
<p>http://curl.phptrack.com/</p>
<p>/////////////////////////////////////  GMAIL Driver Class  /////////////////////////////////////////////</p>
<p>http://sourceforge.net/project/screenshots.php?group_id=125071</p>
<p>http://sourceforge.net/project/showfiles.php?group_id=125071&#038;package_id=136821</p>
<p>////////////////////////////////////               .htaccess    //////////////////////////////////////////////////////////</p>
<p>http://corz.org/serv/tricks/htaccess.php</p>
<p>http://www.javascriptkit.com/howto/htaccess14.shtml</p>
<p>http://support.tagnet.org/password.php</p>
<p>http://www.webhostgear.com/63,2.html</p>
<p>http://cooletips.de/htaccess/</p>
<p>http://www.promotiondata.com/sections.php?op=viewarticle&#038;artid=30</p>
<p>http://www.thejackol.com/htaccess-cheatsheet/</p>
<p>/////////////////////////////////////            JAVASCRIPT     ///////////////////////////////////////////////////////////</p>
<p>http://www.howtocreate.co.uk/jslibs/htmlhigh/capsDetect.html</p>
<p>http://www.visualbuilder.com/showCode.php?id=79643&#038;scd_id=2575</p>
<p>http://www.codeproject.com/useritems/Detect_Caps_Lock.asp?print=true</p>
<p>http://webscripts.softpedia.com/cat/Forms-and-Controls-C-C-list-154-7-0-0.html</p>
<p>http://4wordsystems.com/javascript-email-validator.php</p>
<p>http://www.javascriptkit.com/script/cutindex24.shtml</p>
<p>http://javascript.internet.com/forms/check-cap-locks.html</p>
<p>http://www.jdstiles.com/java/checkforcaps.html</p>
<p>http://snippets.dzone.com/posts/show/142</p>
<p>/////////////////////////////////////             META         ///////////////////////////////////////////////////////////</p>
<p>http://www.webmates.ch/en/meta_tag_builder.html</p>
<p>http://www.webdevelopersnotes.com/tips/html/internet_explorer_tra</p>
<p>nsition_effects_for_web_pages.php3</p>
<p>/////////////////////////////////////             MYSQL        ///////////////////////////////////////////////////////////</p>
<p>http://www.issociate.de/board/post/301414/Access_denied_for_user_&#8217;ODBC</p>
<p>&#8216;@&#8217;localhost&#8217;_(using_password:_NO).html</p>
<p>http://www.mikebernat.com/index/a/article/id/Making%20your%20MySQL%2</p>
<p>0Tables%20More%20Effeciant%20by%20Using%20Correct%20Fieldtypes?PHPS</p>
<p>ESSID=228c6f0ae3269cda36c7dc528e9c2a4d</p>
<p>http://www.vclcomponents.com/PHP/Web_Fetching_Scripts/Contact_Importe</p>
<p>r__Adress_Book_Grabber__for_hotmail__yahoo__gmail__aol__msn-info.html</p>
<p>http://marvinsweb.net/support/?View=entry&#038;EntryID=45</p>
<p>http://dev.mysql.com/doc/refman/5.0/en/connecting-disconnecting.html</p>
<p>http://www.peachpit.com/articles/article.asp?p=30885&#038;seqNum=1&#038;rl=1</p>
<p>http://www.xnote.com/howto/mysql_field_types.html</p>
<p>http://www.browardphp.com/mysql_manual_en/manual_Client-Side_Scripts.html</p>
<p>http://www.developer.com/db/article.php/2235521</p>
<p>http://www.devshed.com/c/a/MySQL/Storage-Engine-Table-Types/</p>
<p>http://www.google.co.in/search?hl=en&#038;q=table+types+%2B+mysql&#038;meta=</p>
<p>///////////////////////////////////              thought    //////////////////////////////////////////////////////////////////</p>
<p>http://www.dailygood.org/</p>
<p>http://www.interluderetreat.com/thought.htm</p>
<p>http://cihar.com/gammu/</p>
<p>http://www.parkerandhobbes.co.uk/sendsmstextmessage.php</p>
<p>http://www.sephiroth.it/tutorials/flashPHP/sms/</p>
<p>http://montreal.craigslist.org/eng/314114018.html</p>
<p>http://buddycheck.nuotex.qarchive.org/</p>
<p>http://hotscripts.topdownloads.net/detail/34160/yahoo-messenger-invisible-status.html</p>
<p>http://yahoo-messenger-invisible.ikitek.com/</p>
<p>////////////////////////////////////               GOOGLE SERACH LINKS  ///////////////////////////////////////////////////////</p>
<p>http://www.google.com/custom?hl=en&#038;client=pub-8993703457585266&#038;cof=FOR</p>
<p>ID:1%3BAH:left%3BS:http://www.blackle.com/%3BCX:Blackle%3BL:http://ww</p>
<p>w.heapmedia.com/blackle/logo.jpg%3BLH:100%3BLP:1%3BBGC:%23000000%3BT:</p>
<p>%23999999%3BLC:%23cccccc%3BVLC:%23999999%3BGALT:%23666666%3BGFNT:</p>
<p>%23666666%3BGIMP:%23666666%3B&amp;cx=!013269018370076798483:gg7jrrhpsy4</p>
<p>&amp;sa=X&amp;oi=spell&amp;resnum=0&amp;ct=result&amp;cd=1&amp;q=random+password+%2B+php&amp;spell=1</p>
<p>//////////////////start .htaccess related links////////////////////////////</p>
<p>http://www.shawngo.com/htaccess-tutorial.php</p>
<p>http://www.shaw.ca/en-ca/CustomerCare/InternetSupport/Business/WebSpace/</p>
<p>UsingWebSpace/htaccess.htm<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>http://www.freewebmasterhelp.com/tutorials/htaccess/</p>
<p>http://www.buildwebsite4u.com/advanced/htaccess-file.shtml</p>
<p>http://www.outfront.net/tutorials_02/adv_tech/htaccess_magic2.htm</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>http://httpd.apache.org/docs/1.3/howto/htaccess.html</p>
<p>http://httpd.apache.org/docs/2.0/howto/htaccess.html</p>
<p>http://www.javascriptkit.com/howto/htaccess.shtml</p>
<p>//////////////////end .htaccess related links////////////////////////////</p>
<p>http://www.xul.fr/en-xml-rss.html#why &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;Imp</p>
<p>http://www.faganfinder.com/search/rss.php</p>
<p>http://sports.espn.go.com/espn/news/story?page=rssinfo</p>
<p>http://www.feedvalidator.org/</p>
<p>http://www.unauthorizedentry.com/funny/main.php?banner=y# &#8211;Referece site<br />
http://www.co.loudoun.va.us/rss/index.htm &#8211;Reference site</p>
<p>//////////////////////////USPS.com//////////////////////////<br />
http://www.allthescripts.com/page-459312.htm (it&#8217;s good for USPS.com)</p>
<p>http://www.zend.com/code/codex.php?id=202&#038;single=1</p>
<p>//////////////convert any unit to other related unit////////////////////</p>
<p>http://www.asknumbers.com/</p>
<p>////////////////////////////////////////////////////////////////////////<br />
//////////////////////////  End IMP LINKS  /////////////////////////////<br />
////////////////////////////////////////////////////////////////////////</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=14&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/list-of-good-site-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi Select Box to MySql DB Table</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/multi-select-box-to-mysql-db-table-2/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/multi-select-box-to-mysql-db-table-2/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 07:18:48 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/multi-select-box-to-mysql-db-table-2/</guid>
		<description><![CDATA[&#60;? //Create multi select box, pulling data from db $sql = “SELECT id,name FROM table ORDER BY name ASC”; $result = mysql_query($sql); if($result &#38;&#38; mysql_num_rows($result)&#62;0) { ?&#62; &#60;select name=“id[]” size=5 multiple&#62;&#60;option value=0 selected&#62;Select Name…&#60;/option&#62; &#60;? for($i=0;$i&#60;mysql_num_rows($result);$i++) { $arr=mysql_fetch_array($result); echo “&#60;option value=” . $arr[‘id’] . “&#62;”.$arr[‘name’]; } echo “&#60;/select&#62;”; }else echo “No Names in DB”; ?&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=12&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="snap_preview">&lt;?<br />
<span style="color:#808080;font-style:italic;">//Create multi  select box, pulling data from db</span><br />
$sql = <span style="color:#ff0000;">“SELECT id,name FROM table ORDER BY name  ASC”</span>;<br />
$result = mysql_query<span style="color:#66cc66;">(</span>$sql<span style="color:#66cc66;">)</span>;</p>
<p><span style="color:#b1b100;">if</span><span style="color:#66cc66;">(</span>$result &amp;&amp; mysql_num_rows<span style="color:#66cc66;">(</span>$result<span style="color:#66cc66;">)</span>&gt;<span style="color:#cc66cc;">0</span><span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
?&gt;<br />
&lt;select name=<span style="color:#ff0000;">“id[]”</span> size=<span style="color:#cc66cc;">5</span>  multiple&gt;&lt;option value=<span style="color:#cc66cc;">0</span>  selected&gt;Select Name…&lt;/option&gt;<br />
&lt;?<br />
<span style="color:#b1b100;">for</span><span style="color:#66cc66;">(</span>$i=<span style="color:#cc66cc;">0</span>;$i&lt;mysql_num_rows<span style="color:#66cc66;">(</span>$result<span style="color:#66cc66;">)</span>;$i++<span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
$arr=mysql_fetch_array<span style="color:#66cc66;">(</span>$result<span style="color:#66cc66;">)</span>;<br />
echo <span style="color:#ff0000;">“&lt;option value=”</span> . $arr<span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘id’</span><span style="color:#66cc66;">]</span> . <span style="color:#ff0000;">“&gt;”</span>.$arr<span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘name’</span><span style="color:#66cc66;">]</span>;<br />
<span style="color:#66cc66;">}</span><br />
echo <span style="color:#ff0000;">“&lt;/select&gt;”</span>;<br />
<span style="color:#66cc66;">}</span><span style="color:#b1b100;">else</span><br />
echo  <span style="color:#ff0000;">“No Names in DB”</span>;<br />
?&gt;</p>
<p>&lt;?<br />
<span style="color:#808080;font-style:italic;">//when multi select  is submitted from form, this part processes it</span></p>
<p>$id = $_POST<span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘id’</span><span style="color:#66cc66;">]</span>;</p>
<p>foreach <span style="color:#66cc66;">(</span>$_POST<span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘id’</span><span style="color:#66cc66;">]</span> as $id<span style="color:#66cc66;">)</span></p>
<p>$result_system = mysql_query<span style="color:#66cc66;">(</span><span style="color:#ff0000;">“INSERT INTO diff_table (diff_id,id) VALUES  (’$diff_id’,&#8217;”</span> . $id . <span style="color:#ff0000;">“‘)”</span><span style="color:#66cc66;">)</span>or die<span style="color:#66cc66;">(</span><span style="color:#ff0000;">“Insert Error: “</span>.<span style="color:#202020;">mysql_error</span><span style="color:#66cc66;">(</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span>;</p>
<p>?&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=12&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/multi-select-box-to-mysql-db-table-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>php ini settings</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/php-ini-settings/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/php-ini-settings/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 07:18:14 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/php-ini-settings/</guid>
		<description><![CDATA[Hello Friends, A article which describe what is the use of particular variable in php.ini files and how to do settings in this file. How to set each variable in php.ini file and what is the purpose of each is explain in this article. Please go through and will definetely get the solution. Php.ini setting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=13&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="snap_preview">Hello Friends,</p>
<p>A article which describe what is the use of particular variable in php.ini  files and how to do settings in this file. How to set each variable in php.ini  file and what is the purpose of each is explain in this article. Please go  through and will definetely get the solution.</p>
<p>Php.ini setting for each variable:</p>
<p>1 &gt; <strong>allow_call_time_pass_reference Boolean</strong></p>
<p>Whether to enable the ability to force arguments to be passed by reference at  function call time. This method is deprecated and is likely to be unsupported in  future versions of PHP/Zend. The encouraged method of specifying which arguments  should be passed by reference is in the function declaration. You’re encouraged  to try and turn this option Off and make sure your scripts work properly with it  in order to ensure they will work with future versions of the language (you will  receive a warning each time you use this feature, and the argument will be  passed by value instead of by reference).</p>
<p>Passing arguments by reference at function call time was deprecated for code  cleanliness reason. Function can modify its argument in undocumented way if it  didn’t declare that the argument is passed by reference. To prevent side effects  it’s better to specify which arguments are passed by reference in function  declaration only.</p>
<p>====================================================</p>
<p>2 &gt; <strong>allow_url_fopen</strong></p>
<p>This option enables the URL-aware fopen wrappers that enable accessing URL  object like files. Default wrappers are provided for the access of <a href="http://livedocs.php.mirrors.powertrip.co.za/en/features.remote-files.html">remote  files</a> using the ftp or http protocol, some extensions like <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ref.zlib.html">zlib</a> may  register additional wrappers.</p>
<p>This setting can only be set in php.ini due to security reasons.</p>
<p>This option was introduced immediately after the release of version 4.0.3.  For versions up to and including 4.0.3 you can only disable this feature at  compile time by using the configuration switch <a href="http://livedocs.php.mirrors.powertrip.co.za/en/configure.options.misc.html#configure.disable-url-fopen-wrapper">–disable-url-fopen-wrapper</a>.</p>
<p>====================================================</p>
<p>3 &gt; <strong>always_populate_raw_post_data Boolean</strong></p>
<p>Always populate the $HTTP_RAW_POST_DATA variable.</p>
<p>4 &gt; <strong>arg_separator.input</strong></p>
<p>List of separator(s) used by PHP to parse input URLs into variables</p>
<p>5 &gt; <strong>arg_separator.output</strong></p>
<p>The separator used in PHP generated URLs to separate arguments</p>
<p>6 &gt; <strong>asp_tags</strong></p>
<p>Enables the use of ASP-like &lt;% %&gt; tags in addition to the usual  &lt;?php ?&gt; tags. This includes the variable-value printing shorthand of  &lt;%= $value %&gt;.</p>
<p>7 &gt; <strong>auto_globals_jit Boolean</strong></p>
<p>When enabled, the SERVER and ENV variables are created when they’re first  used (Just In Time) instead of when the script starts. If these variables are  not used within a script, having this directive on will result in a performance  gain</p>
<p>The PHP directives <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.register-globals">register_globals</a>,  <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.register-long-arrays">register_long_arrays</a>,  and <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.register-argc-argv">register_argc_argv</a>  must be disabled for this directive to have any affect.</p>
<p>8 &gt; <strong>display_error and display_startup_errors</strong></p>
<p>These two settings control whether PHP should display errors in the browser  or be silent. It is recommended that you turn these two settings Off during  production so that you don’t accidentally display sensitive information about  your Web site. This is especially true for dynamic Web sites that send usernames  and password to access a database. In your php.ini file, this configuration will  look like:</p>
<p>display_errors = off</p>
<p>display_startup_errors = off</p>
<p>9 &gt; <strong>log_erros and error_log</strong></p>
<p>There two settings control how PHP logs errors for later review. It is  helpful to use these two settings if you have turned Off display_errors and  display_startup_errors. In your php.ini file, this configuration will look  like</p>
<p>Log_errors = On</p>
<p>Error_log = /hwxx/daxx/uwnetid/phperrors.log</p>
<p>Replace /hwxx/daxx/uwnetid/ with the <a href="http://www.washington.edu/computing/web/publishing/cgi-develop.html#10">path  to your Web directory</a>. Make sure that you have a file called phperrors.log  in the root of your Web directory (typically public_html) and make sure it is  read and writable by you</p>
<p>10 &gt; <strong>session.save_path</strong></p>
<p>This setting controls the location of server-side session cookies when your  script uses PHP’s session management functions. The server default php.ini file  has this variable set to /use/a/folder/in/your/web/root, disabling the user of  sessions. In order to use PHP sessions, you will need to create a temp folder in  your web directory and change this option to point to it:</p>
<p>There are a number of reasons for requiring this configuration:</p>
<p>(1) To make sure that another user doesn’t tamper with these cookies. (2)To  keep the /tmp folder from filling up, causing other programs to fail. (3) Due to  the clustered nature of the UW webservers, session info should be stored in a  place that is available on all machines in the cluster</p>
<p>session.save_path = /hwxx/daxx/uwnetid/tmp</p>
<p>Replace /hwxx/daxx/uwnetid/ with the <a href="http://www.washington.edu/computing/web/publishing/cgi-develop.html#10">path  to your Web directory</a>. Again, make sure that you have a directory called tmp  in the root of your Web directory (typically public_html) and make sure it is <a href="http://www.washington.edu/computing/web/publishing/permissions.html">read  and writable</a> by you only</p>
<p>11 &gt; <strong>upload_temp_dir</strong></p>
<p>This setting controls the temporary location of files uploaded with an HTML  form. If you don’t specify a path for this setting, uploaded files will be  temporarily stored in a world-readable location on the server. To protect ease  of manipulation and the confidentiality of such files, you should create a  directory in your account and specify the new path in your php.ini file</p>
<p>upload_tmp_dir = /hwxx/daxx/uwnetid/tmp</p>
<p>Replace /hwxx/daxx/uwnetid/ with the <a href="http://www.washington.edu/computing/web/publishing/cgi-develop.html#10">path  to your Web directory</a>. Make sure that you have a directory called tmp in the  root of your Web directory (typically public_html) and make sure it is read and  writable by you only.</p>
<p>13 &gt; <strong>enable_dl</strong></p>
<p>This directive is really only useful in the Apache module version of PHP. You  can turn dynamic loading of PHP extensions with <a href="http://livedocs.php.mirrors.powertrip.co.za/en/function.dl.html">dl()</a>  on and off per virtual server or per directory.</p>
<p>The main reason for turning dynamic loading off is security. With dynamic  loading, it’s possible to ignore all <a href="http://livedocs.php.mirrors.powertrip.co.za/en/features.safe-mode.html#ini.open-basedir">open_basedir</a>  restrictions. The default is to allow dynamic loading, except when using <a href="http://livedocs.php.mirrors.powertrip.co.za/en/features.safe-mode.html#ini.safe-mode">safe  mode</a>. In <a href="http://livedocs.php.mirrors.powertrip.co.za/en/features.safe-mode.html#ini.safe-mode">safe  mode</a>, it’s always impossible to use <a href="http://livedocs.php.mirrors.powertrip.co.za/en/function.dl.html">dl()</a>.</p>
<p>14 &gt; <strong>extension_dir string</strong></p>
<p>In what directory PHP should look for dynamically loadable extensions</p>
<p>15 &gt; <strong>file_uploads</strong></p>
<p>Whether or not to allow HTTP <a href="http://livedocs.php.mirrors.powertrip.co.za/en/features.file-upload.html">file  uploads</a>. See also the <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.upload-max-filesize">upload_max_filesize</a>,  <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.upload-tmp-dir">upload_tmp_dir</a>,  and <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.post-max-size">post_max_size</a>  directives</p>
<p>16 &gt; <strong>gpc_order</strong></p>
<p>Set the order of GET/POST/COOKIE variable parsing. The default setting of  this directive is “GPC”. Setting this to “GP”, for example, will cause PHP to  completely ignore cookies and to overwrite any GET method variables with  POST-method variables of the same name</p>
<p>This option is not available in PHP 4. Use <a href="http://livedocs.php.mirrors.powertrip.co.za/en/ini.html#ini.variables-order">variables_order</a>  instead</p>
<p>17 &gt; <strong>include_path</strong></p>
<p>Specifies a list of directories where the <a href="http://livedocs.php.mirrors.powertrip.co.za/en/language.control-structures.html#function.require">require()</a>,  <a href="http://livedocs.php.mirrors.powertrip.co.za/en/language.control-structures.html#function.include">include()</a>  and <a href="http://livedocs.php.mirrors.powertrip.co.za/en/function.fopen-with-path.html">fopen_with_path()</a>  functions look for files. The format is like the system’s PATH environment  variable: a list of directories separated with a colon in Unix or semicolon in  Windows</p>
<p>Unix include_path</p>
<p>include_path=”.:/php/includes”</p>
<p>Window include_path</p>
<p>include_path=”.;c:\php\includes”</p>
<p>Using a . in the include path allows for relative includes as it means the  current directory</p>
<p>18 &gt; <strong>magic_quotes_gpc</strong></p>
<p>Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When  magic_quotes are on, all ‘ (single-quote), ” (double quote), \ (backslash) and  NUL’s are escaped with a backslash automatically.</p>
<p>19 &gt; <strong>magic_quotes_runtime</strong></p>
<p>If magic_quotes_runtime is enabled, most functions that return data from any  sort of external source including databases and text files will have quotes  escaped with a backslash. If <a href="http://livedocs.php.mirrors.powertrip.co.za/en/sybase.configuration.html#ini.magic-quotes-sybase">magic_quotes_sybase</a>  is also on, a single-quote is escaped with a single-quote instead of a  backslash.</p>
<p>20 &gt;<strong> magic_quotes_sybase</strong></p>
<p>If the <a href="http://livedocs.php.mirrors.powertrip.co.za/en/sybase.configuration.html#ini.magic-quotes-sybase">magic_quotes_sybase</a>  directive is also ON it will completely override magic_quotes_gpc. Having both  directives enabled means only single quotes are escaped as ”. Double quotes,  backslashes and NUL’s will remain untouched and unescaped</p>
<p>21 &gt; <strong>max_execution_time</strong></p>
<p>This sets the maximum time in seconds a script is allowed to run before it is  terminated by the parser. This helps prevent poorly written scripts from tying  up the server. The default setting is 30.</p>
<p>The maximum execution time is not affected by system calls, stream operations  etc. Please see the <a href="http://in2.php.net/function.set-time-limit.php">set_time_limit()</a>  function for more details.</p>
<p>You can not change this setting with <a href="http://in2.php.net/function.ini-set.php">ini_set()</a> when running in <a href="http://in2.php.net/features.safe-mode.php#ini.safe-mode">safe mode</a>.  The only workaround is to turn off safe mode or by changing the time limit in  the php.ini.</p>
<p>Your webserver can have other timeouts. E.g. Apache has Timeout directive,  IIS has CGI timeout function, both default to 300 seconds. See the webserver  documentation for meaning of it.</p>
<p>22 &gt; <strong>max_input_time</strong></p>
<p>This sets the maximum time in seconds a script is allowed to receive input  data, like POST, GET and file uploads</p>
<p>23 &gt; <strong>open_basedir</strong></p>
<p>Limit the files that can be opened by PHP to the specified directory-tree,  including the file itself. This directive is NOT affected by whether Safe Mode  is turned On or Off.</p>
<p>When a script tries to open a file with, for example, <a href="http://in.php.net/function.fopen.php">fopen()</a> or <a href="http://in.php.net/function.gzopen.php">gzopen()</a>, the location of the  file is checked. When the file is outside the specified directory-tree, PHP will  refuse to open it. All symbolic links are resolved, so it’s not possible to  avoid this restriction with a symlink.</p>
<p>The special value . indicates that the working directory of the script will  be used as the base-directory. This is, however, a little dangerous as the  working directory of the script can easily be changed with <a href="http://in.php.net/function.chdir.php">chdir()</a>.</p>
<p>In httpd.conf, open_basedir can be turned off (e.g. for some virtual hosts)  <a href="http://in.php.net/configuration.changes.php#configuration.changes.apache">the  same way</a> as any other configuration directive with “php_admin_value  open_basedir none”.</p>
<p>Under Windows, separate the directories with a semicolon. On all other  systems, separate the directories with a colon. As an Apache module,  open_basedir paths from parent directories are now automatically inherited.</p>
<p>The restriction specified with open_basedir is actually a prefix, not a  directory name. This means that “open_basedir = /dir/incl” also allows access to  “/dir/include” and “/dir/incls” if they exist. When you want to restrict access  to only the specified directory, end with a slash. For example: “open_basedir =  /dir/incl/”</p>
<p>Note: Support for multiple directories was added in 3.0.7.</p>
<p>The default is to allow all files to be opened.</p>
<p>24 &gt; <strong>output_buffering</strong></p>
<p>Normally, session, cookie or HTTP header data in a PHP script must be sent  before any output is generated by the script. If this is not possible in your  application, you can enable what PHP calls output buffering, with the  output_buffering variable.</p>
<p>With output buffering on, PHP stores the output of your script in a special  memory buffer and sends it only when explicitly told to do so. This allows you  to send special HTTP headers and cookie data even in the middle or at the end of  your script; however, it can degrade performance marginally.</p>
<p>output_buffering = Off</p>
<p>You can also pass the output_buffering variable a number indicating the size  of the buffer, for example:</p>
<p>output_buffering = 2048</p>
<p>25 &gt; <strong>output_handler</strong></p>
<p>You can redirect all of the output of your scripts to a function. For  example, if you set output_handler to <a href="http://php.mirrors.ilisys.com.au/manual/en/function.mb-output-handler.php">mb_output_handler()</a>,  character encoding will be transparently converted to the specified encoding.  Setting any output handler automatically turns on output buffering.</p>
<p>Note: You cannot use both <a href="http://php.mirrors.ilisys.com.au/manual/en/function.mb-output-handler.php">mb_output_handler()</a>  with <a href="http://php.mirrors.ilisys.com.au/manual/en/function.ob-iconv-handler.php">ob_iconv_handler()</a>  and you cannot use both <a href="http://php.mirrors.ilisys.com.au/manual/en/function.ob-gzhandler.php">ob_gzhandler()</a>  and <a href="http://php.mirrors.ilisys.com.au/manual/en/ref.zlib.php#ini.zlib.output-compression">zlib.output_compression</a>.</p>
<p>Note: Only built-in functions can be used with this directive. For user  defined functions, use <a href="http://php.mirrors.ilisys.com.au/manual/en/function.ob-start.php">ob_start()</a>.</p>
<p>26 &gt; <strong>post_max_size</strong></p>
<p>Also related to form submission is the post_max_size variable, which controls  the maximum amount of data that PHP will accept in a single form submission with  the POST method. It’s unlikely you’ll ever need to increase this from the  default value of 8 MB; instead, you should probably reduce it to a more  realistic figure. However, if you’re planning on using the file upload features  of PHP, keep this value greater than the value of upload_max_filesize.</p>
<p>post_max_size = 8M</p>
<p>27 &gt; <strong>precision</strong></p>
<p>The number of significant digits displayed in floating point numbers.</p>
<p>28 &gt; <strong>register_argc_argv</strong></p>
<p>Tells PHP whether to declare the argv &amp; argc variables (that would  contain the GET information).</p>
<p>29 &gt; <strong>register_globals</strong></p>
<p>New to PHP 4.1.0, the register_globals setting controls how you access form,  server, and environment variables. By default this variable is set to Off,  requiring you to use special arrays to access these variables. Those familiar  with older versions of PHP will be used to an environment in which the  register_globals variable is effectively On; with this setting, you can access  form, server and environment variables simply by name</p>
<p>Note: This change occurred in PHP 4.1.0 because when register_globals is set  to On, PHP scripts are more vulnerable to attacks. Some older PHP applications  will require this setting to be on, but it is safer to write new scripts with  the assumption that register_globals will be set to Off</p>
<p>To retrieve the value of &lt;input name=”formVariable”&gt; from a form  submitted with the POST method, use the following syntax</p>
<p>PHP code when register_globals = On</p>
<p>$myNewVariable = $formVariable</p>
<p>PHP code when register_globals = Off</p>
<p>$myNewVariable = $_POST[’formVariable’];</p>
<p>30 &gt; <strong>report_memleaks</strong></p>
<p>report_memleaks is one of the few directives in the php.ini file that I’ve  never had reason to change. Setting this to “Off” will prevent memory leak  errors being displayed. However, memory leaks are only displayed when you  compile PHP with “–enable-debug” (which allows you to perform some advanced  tasks (eg backtraces). This would never affect a production environment, and  rarely a development one.<br />
Values: On (default), Off</p>
<p>31 &gt; <strong>safe_mode</strong></p>
<p>The PHP safe mode is an attempt to solve the shared-server security problem.  It is architecturally incorrect to try to solve this problem at the PHP level,  but since the alternatives at the web server and OS levels aren’t very  realistic, many people, especially ISP’s, use safe mode for now</p>
<p>Whether to enable PHP’s safe mode. Read the <a href="http://in2.php.net/security.php">Security</a> chapter for more  information.</p>
<p>32 &gt; <strong>safe_mode_exec_dir</strong></p>
<p>If PHP is used in safe mode, <a href="http://in2.php.net/function.system.php">system()</a> and the other <a href="http://in2.php.net/ref.exec.php">functions executing system programs</a>  refuse to start programs that are not in this directory. You have to use / as  directory separator on all environments including Windows.</p>
<p>One Safe Mode trouble maker is safe_mode_exec_dir. By default  safe_mode_exec_dir is empty, so external programs like `convert’ cannot be  started.</p>
<p>In my testing, on one (Debian) server I was able to use Image Magick’s  `convert’ command (but not for converting gallery images) by using the following  steps:</p>
<p>Create a link to `convert’ in /usr/local/bin/ with</p>
<pre>  ln -s /usr/bin/convert /usr/local/bin/</pre>
<p>Enable starting programs in that directory with a line in php.ini</p>
<pre>  safe_mode_exec_dir = "/usr/local/bin"</pre>
<p>Restart the web server.<br />
Make Qdig aware of the new location with</p>
<pre>  $convert_cmd = '/usr/bin/convert';@@</pre>
<p>This also works:</p>
<p>Enable starting /usr/bin programs in php.ini with</p>
<pre>  safe_mode_exec_dir = "/usr/local/bin"</pre>
<p>Restart the web server.</p>
<p>so does this:</p>
<p>Create a directory for PHP-safe binaries</p>
<pre>  mkdir /usr/local/php_safe_bin</pre>
<p>Create a link to `convert’ in /usr/local/bin/ with</p>
<pre>  ln -s /usr/bin/convert /usr/local/php_safe_bin/</pre>
<p>Enable starting programs in that directory with a line in php.ini</p>
<pre>  safe_mode_exec_dir = "/usr/local/php_safe_bin"</pre>
<p>Restart the web server.<br />
Make Qdig aware of the new location with</p>
<pre>  $convert_cmd = '/usr/php_safe_bin/convert';@@</pre>
<p>The reason for creating a link rather than copying the file is because  otherwise system updates will not replace the copy you are using.</p>
<p>For review, the three pertinent settings in php.ini are</p>
<pre>  safe_mode = On</pre>
<pre>  safe_mode_gid = On</pre>
<pre>  safe_mode_exec_dir = "/path/to/convert/executable"</pre>
<p>where only the top two lines are necessary if you are using GD to convert  images.</p>
<p>33 &gt; <strong>safe_mode_gid</strong></p>
<p>By default, Safe Mode does a UID compare check when opening files. If you  want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use  UID (FALSE) or GID (TRUE) checking upon file access</p>
<p>To avoid the server-can’t-access-files-it-has-written error, the server  administrator can enable PHP’s safe_mode_gid by adding this line</p>
<pre>  safe_mode_gid = On</pre>
<p>to the the server’s PHP configuration file (php.ini) and restarting the web  server daemon.</p>
<p>Your web hosting provider should be willing to enable safe_mode_gid (<a href="http://www.php.net/features.safe-mode">manual page</a>) for you because  the security benefit probably exceeds the security risk. This is because</p>
<p>· files written in ordinary (non-SetGID) directories still will be blocked,  and</p>
<p>· leaving it disabled encourages users to use world-writable directories and  files.</p>
<p>Enabling safe_mod_gid, combined with using (temporarily) “2777″ (versus  “777″) permissions for the qdig-files/ directory during setup, will cause your  Qdig installation to Just Work as long PHP’s GD extension is loaded and  available for image conversion</p>
<p>34 &gt; <strong>safe_mode_include_dir</strong></p>
<p>UID/GID checks are bypassed when including files from this directory and its  subdirectories (directory must also be in <a href="http://php.mirrors.ilisys.com.au/manual/en/ini.core.php#ini.include-path">include_path</a>  or full path must including).</p>
<p>As of PHP 4.2.0, this directive can take a colon (semi-colon on Windows)  separated path in a fashion similar to the <a href="http://php.mirrors.ilisys.com.au/manual/en/ini.core.php#ini.include-path">include_path</a>  directive, rather than just a single directory.</p>
<p>The restriction specified is actually a prefix, not a directory name. This  means that “safe_mode_include_dir = /dir/incl” also allows access to  “/dir/include” and “/dir/incls” if they exist. When you want to restrict access  to only the specified directory, end with a slash. For example:  “safe_mode_include_dir = /dir/incl/”</p>
<p>If the value of this directive is empty, no files with different UID/GID can  be included in PHP 4.2.3 and as of PHP 4.3.3. In earlier versions, all files  could be included.</p>
<p>35 &gt; <strong>sendmail_from</strong></p>
<p>In either case, you’ll want to set the sendmail_from option to your email  address, or whichever address you’d like to appear as the default ‘from’ address  for emails sent from PHP scripts.</p>
<p>Here’s how the section might look on a typical Windows server, or on a Linux  server without sendmail:</p>
<p>[mail function]<br />
; Setup for Windows systems<br />
SMTP = smtp.my.isp<a href="http://www.sitepoint.com/glossary.php?q=%23#term_2">.net</a><br />
sendmail_from  = me@myserver.com</p>
<p>And here’s how it might look on a Linux server with sendmail:</p>
<p>[mail function]<br />
; Setup for Linux systems<br />
sendmail_path =  /usr/sbin/sendmail -t<br />
sendmail_from = me@myserver.com</p>
<p>36 &gt; <strong>sendmail_path</strong></p>
<p>If you’re going to use PHP’s mail() function, there are three variables you  may need to set. The SMTP and sendmail_from variables (on Windows) or the  sendmail_path variable (on UNIX) are used when sending e-mail messages through  PHP’s mail() function. On Windows, these variables set the SMTP server to be  used and the From: address to display in e-mail messages; on UNIX, the  sendmail_path variable sets the path of the MTA (mail transfer agent) for mail  delivery:</p>
<pre>                        SMTP = myserver.localnet.com</pre>
<pre>   sendmail_from = me@localhost.com</pre>
<pre>                        sendmail_path = /usr/sbin/sendmail</pre>
<p>37 &gt; <strong>short_open_tag</strong></p>
<p>Tells whether the short form (&lt;? ?&gt;) of PHP’s open tag should be  allowed. If you want to use PHP in combination with XML, you can disable this  option in order to use &lt;?xml ?&gt; inline. Otherwise, you can print it with  PHP, for example: &lt;?php echo ‘&lt;?xml version=”1.0″‘; ?&gt;. Also if  disabled, you must use the long form of the PHP open tag (&lt;?php ?&gt;).</p>
<p>Note: This directive also affects the shorthand &lt;?=, which is identical to  &lt;? echo. Use of this shortcut requires short_open_tag to be on.</p>
<p>38 &gt; <strong>SMTP</strong></p>
<p>If you’re going to use PHP’s mail() function, there are three variables you  may need to set. The SMTP and sendmail_from variables (on Windows) or the  sendmail_path variable (on UNIX) are used when sending e-mail messages through  PHP’s mail() function. On Windows, these variables set the SMTP server to be  used and the From: address to display in e-mail messages; on UNIX, the  sendmail_path variable sets the path of the MTA (mail transfer agent) for mail  delivery:</p>
<p>SMTP = myserver.localnet.com</p>
<p>39 &gt; <strong>smtp_port</strong></p>
<p>Used under Windows only: Number of the port to connect to the server  specified with the SMTP setting when sending mail with <a href="http://www.phpfreaks.com/phpmanual/page/function.mail.html">mail()</a>;  defaults to 25. Only available since PHP 4.3.0.</p>
<p>40 &gt; <strong>track_errors</strong></p>
<p>If enabled, the last error message will always be present in the global  variable $php_errormsg</p>
<p>In addition, if you set the php.ini setting track_errors = On, the last error  message encountered will be stored in $php_errormsg. This is true regardless of  whether you have used the @ syntax for error suppression</p>
<p>41 &gt; <strong>unserialize_callback_func</strong></p>
<p>The unserialize_callback_func directive is one of the more advanced settings  in the php.ini file, and the chances are very good that if you change this  before you are familiar with serialization, you will cause massive problems on  your own server. I’d leave this well alone!</p>
<p>42 &gt; <strong>upload_max_filesize</strong></p>
<p>The maximum size of an uploaded file. When an <a href="http://php.mirrors.ilisys.com.au/manual/en/language.types.integer.php">integer</a>  is used, the value is measured in bytes. You may also use shorthand notation as  described in <a href="http://php.mirrors.ilisys.com.au/manual/en/faq.using.php#faq.using.shorthandbytes">this  FAQ</a>.</p>
<p>43 &gt; <strong>upload_tmp_dir</strong></p>
<p>This setting controls the temporary location of files uploaded with an HTML  form. If you don’t specify a path for this setting, uploaded files will be  temporarily stored in a world-readable location on the server. To protect ease  of manipulation and the confidentiality of such files, you should create a  directory in your account and specify the new path in your php.ini file:</p>
<p>upload_tmp_dir = /hwxx/daxx/uwnetid/tmp</p>
<p>Replace /hwxx/daxx/uwnetid/ with the <a href="http://www.washington.edu/computing/web/publishing/cgi-develop.html#10">path  to your Web directory</a>. Make sure that you have a directory called tmp in the  root of your Web directory (typically public_html) and make sure it is read and  writable by you only.</p>
<p>44 &gt; <strong>user_dir</strong></p>
<p>The base name of the directory used on a user’s home directory for PHP files,  for example public_html.</p>
<p>45 &gt; <strong>variables_order</strong></p>
<p>Set the order of the EGPCS (Environment, GET, POST, Cookie, Server) variable  parsing. The default setting of this directive is “EGPCS”. Setting this to “GP”,  for example, will cause PHP to completely ignore environment variables, cookies  and server variables, and to overwrite any GET method variables with POST-method  variables of the same name</p>
<p>46 &gt; <strong>y2k_compliance</strong></p>
<p>The y2k_compliance directive instructs PHP to use 4-digit years. This setting  can apparently cause problems with some browsers (Navigator 3, and possibly  others &#8211; any that can’t understand 4-digit years) when set to On. However, not  having it On will possibly cause problems with modern browsers, which can have  problems with 2-digit years. I leave this on.</p>
<p>Values: On (default), Off</p>
<p>47 &gt; <strong>zend.ze1_compatibility_mode</strong></p>
<p>Enable compatibility mode with Zend Engine 1 (PHP 4). It affects the cloning,  casting, and comparing of objects</p>
<p><strong><u>SESSION</u></strong></p>
<p>48 &gt; <strong>Session Support</strong></p>
<p>Session support in PHP consists of a way to preserve certain data across  subsequent accesses. This enables you to build more customized applications and  increase the appeal of your web site.</p>
<p>A visitor accessing your web site is assigned an unique id, the so-called  session id. This is either stored in a cookie on the user side or is propagated  in the URL.</p>
<p>The session support allows you to register arbitrary numbers of variables to  be preserved across requests. When a visitor accesses your site, PHP will check  automatically (if <a href="http://in.php.net/ref.session.php#ini.session.auto-start">session.auto_start</a>  is set to 1) or on your request (explicitly through <a href="http://in.php.net/function.session-start.php">session_start()</a> or  implicitly through <a href="http://in.php.net/function.session-register.php">session_register()</a>)  whether a specific session id has been sent with the request. If this is the  case, the prior saved environment is recreated.</p>
<p>49 &gt; <strong>session.name <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.name specifies the name of the session which is used as cookie name.  It should only contain alphanumeric characters. Defaults to PHPSESSID. See also  <a href="http://in.php.net/function.session-name.php">session_name()</a>.</p>
<p>50 &gt; <strong>session.auto_start <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>session.auto_start specifies whether the session module starts a session  automatically on request startup. Defaults to 0 (disabled).</p>
<p>51 &gt; <strong>session.serialize_handler <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.serialize_handler defines the name of the handler which is used to  serialize/deserialize data. Currently, a PHP internal format (name php) and WDDX  is supported (name wddx). WDDX is only available, if PHP is compiled with <a href="http://in.php.net/ref.wddx.php">WDDX support</a>. Defaults to php.</p>
<p>52 &gt; <strong>session.gc_probability <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.gc_probability in conjunction with session.gc_divisor is used to  manage probability that the gc (garbage collection) routine is started. Defaults  to 1. See <a href="http://in.php.net/ref.session.php#ini.session.gc-divisor">session.gc_divisor</a>  for details.</p>
<p>53 &gt; <strong>session.gc_divisor <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.gc_divisor coupled with session.gc_probability defines the  probability that the gc (garbage collection) process is started on every session  initialization. The probability is calculated by using  gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that the GC  process starts on each request. session.gc_divisor defaults to 100.</p>
<p>54 &gt; <strong>session.gc_maxlifetime <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.gc_maxlifetime specifies the number of seconds after which data will  be seen as ‘garbage’ and cleaned up.</p>
<p>Note: If you are using the default file-based session handler, your  filesystem must keep track of access times (atime). Windows FAT does not so you  will have to come up with another way to handle garbage collecting your session  if you are stuck with a FAT filesystem or any other fs where atime tracking is  not available. Since PHP 4.2.3 it has used mtime (modified date) instead of  atime. So, you won’t have problems with filesystems where atime tracking is not  available.</p>
<p>55 &gt; <strong>session.referer_check <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.referer_check contains the substring you want to check each HTTP  Referer for. If the Referer was sent by the client and the substring was not  found, the embedded session id will be marked as invalid. Defaults to the empty  string.</p>
<p>56 &gt; <strong>session.entropy_file <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.entropy_file gives a path to an external resource (file) which will  be used as an additional entropy source in the session id creation process.  Examples are /dev/random or /dev/urandom which are available on many Unix  systems.</p>
<p>57 &gt; <strong>session.entropy_length <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.entropy_length specifies the number of bytes which will be read from  the file specified above. Defaults to 0 (disabled).</p>
<p>58 &gt; <strong>session.use_cookies <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>session.use_cookies specifies whether the module will use cookies to store  the session id on the client side. Defaults to 1 (enabled).</p>
<p>59 &gt; <strong>session.use_only_cookies <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>session.use_only_cookies specifies whether the module will only use cookies  to store the session id on the client side. Defaults to 0 (disabled, for  backward compatibility). Enabling this setting prevents attacks involved passing  session ids in URLs. This setting was added in PHP 4.3.0.</p>
<p>60 &gt; <strong>session.cookie_lifetime <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.cookie_lifetime specifies the lifetime of the cookie in seconds which  is sent to the browser. The value 0 means “until the browser is closed.”  Defaults to 0. See also <a href="http://in.php.net/function.session-get-cookie-params.php">session_get_cookie_params()</a>  and <a href="http://in.php.net/function.session-set-cookie-params.php">session_set_cookie_params()</a>.</p>
<p>61 &gt; <strong>session.cookie_path <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.cookie_path specifies path to set in session_cookie. Defaults to /.  See also <a href="http://in.php.net/function.session-get-cookie-params.php">session_get_cookie_params()</a> and <a href="http://in.php.net/function.session-set-cookie-params.php">session_set_cookie_params()</a>.</p>
<p>62 &gt; <strong>session.cookie_domain <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.cookie_domain specifies the domain to set in session_cookie. Default  is none at all. See also <a href="http://in.php.net/function.session-get-cookie-params.php">session_get_cookie_params()</a>  and <a href="http://in.php.net/function.session-set-cookie-params.php">session_set_cookie_params()</a>.</p>
<p>63 &gt; <strong>session.cookie_secure <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>session.cookie_secure specifies whether cookies should only be sent over  secure connections. Defaults to off. This setting was added in PHP 4.0.4. See  also <a href="http://in.php.net/function.session-get-cookie-params.php">session_get_cookie_params()</a>  and <a href="http://in.php.net/function.session-set-cookie-params.php">session_set_cookie_params()</a>.</p>
<p>64 &gt; <strong>session.cache_limiter <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>session.cache_limiter specifies cache control method to use for session pages  (none/nocache/private/private_no_expire/public). Defaults to nocache. See also  <a href="http://in.php.net/function.session-cache-limiter.php">session_cache_limiter()</a>.</p>
<p>65 &gt; <strong>session.cache_expire <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.cache_expire specifies time-to-live for cached session pages in  minutes, this has no effect for nocache limiter. Defaults to 180. See also <a href="http://in.php.net/function.session-cache-expire.php">session_cache_expire()</a>.</p>
<p>66 &gt; <strong>session.use_trans_sid <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>session.use_trans_sid whether transparent sid support is enabled or not.  Defaults to 0 (disabled).</p>
<p>Note: For PHP 4.1.2 or less, it is enabled by compiling with <a href="http://in.php.net/configure.php#configure.enable-trans-sid">–enable-trans-sid</a>.  From PHP 4.2.0, trans-sid feature is always compiled.</p>
<p>URL based session management has additional security risks compared to cookie  based session management. Users may send a URL that contains an active session  ID to their friends by email or users may save a URL that contains a session ID  to their bookmarks and access your site with the same session ID always, for  example.</p>
<p>67 &gt; <strong>session.bug_compat_42 <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>PHP versions 4.2.3 and lower have an undocumented feature/bug that allows you  to initialize a session variable in the global scope, albeit <a href="http://in.php.net/ini.core.php#ini.register-globals">register_globals</a>  is disabled. PHP 4.3.0 and later will warn you, if this feature is used, and if  <a href="http://in.php.net/ref.session.php#ini.session.bug-compat-warn">session.bug_compat_warn</a>  is also enabled. This feature/bug can be disabled by disabling this  directive.</p>
<p>68 &gt; <strong>session.bug_compat_warn <a href="http://in.php.net/language.types.boolean.php">boolean</a> </strong></p>
<p>PHP versions 4.2.3 and lower have an undocumented feature/bug that allows you  to initialize a session variable in the global scope, albeit <a href="http://in.php.net/ini.core.php#ini.register-globals">register_globals</a>  is disabled. PHP 4.3.0 and later will warn you, if this feature is used by  enabling both <a href="http://in.php.net/ref.session.php#ini.session.bug-compat-42">session.bug_compat_42</a>  and <a href="http://in.php.net/ref.session.php#ini.session.bug-compat-warn">session.bug_compat_warn</a>.</p>
<p>69 &gt; <strong>session.hash_function <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.hash_function allows you to specify the hash algorithm used to  generate the session IDs. ‘0′ means MD5 (128 bits) and ‘1′ means SHA-1 (160  bits).</p>
<p>Note: This was introduced in PHP 5.</p>
<p>70 &gt; <strong>session.hash_bits_per_character <a href="http://in.php.net/language.types.integer.php">integer</a> </strong></p>
<p>session.hash_bits_per_character allows you to define how many bits are stored  in each character when converting the binary hash data to something readable.  The possible values are ‘4′ (0-9, a-f), ‘5′ (0-9, a-v), and ‘6′ (0-9, a-z, A-Z,  “-”, “,”).</p>
<p>Note: This was introduced in PHP 5.</p>
<p>71 &gt; <strong>url_rewriter.tags <a href="http://in.php.net/language.types.string.php">string</a> </strong></p>
<p>url_rewriter.tags specifies which HTML tags are rewritten to include session  id if transparent sid support is enabled. Defaults to  a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=</p>
<p>Note: If you want XHTML conformity, remove the form entry and use the  &lt;fieldset&gt; tags around your form fields.</p>
<p>You can add your comments and suggesions regarding this article.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=13&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/php-ini-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP &#8211; Make URLs clickable (And short down)</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/php-make-urls-clickable-and-short-down/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/php-make-urls-clickable-and-short-down/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 07:14:01 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/php-make-urls-clickable-and-short-down/</guid>
		<description><![CDATA[&#60;?php $text = ‘Some text here with an URL here http://www.superlongurl.com/superlongfoldername/filename.ext and some more text here blah blah blah.’; /* Makes the URLs clickable and shorts them down to 35 chars max since it’s the default value and no other one was specified. */ echo parse_urls($text); /* Outputs: Some text here with an URL here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=11&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="snap_preview"><span style="font-weight:bold;color:#000000;">&lt;?php</span></p>
<p><span style="color:#0000ff;">$text</span> = <span style="color:#ff0000;">‘Some text here with an URL here  http://www.superlongurl.com/superlongfoldername/filename.ext and some more text  here blah blah blah.’</span>;</p>
<p><span style="color:#808080;font-style:italic;">/*<br />
Makes the URLs  clickable and shorts them down to 35 chars max since it’s the default value and  no other one was specified.<br />
*/</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> parse_urls<span style="color:#66cc66;">(</span><span style="color:#0000ff;">$text</span><span style="color:#66cc66;">)</span>;</p>
<p><span style="color:#808080;font-style:italic;">/*<br />
Outputs: Some text  here with an URL here http://www.superlongurl.c…ilename.ext and some more text  here blah blah blah.<br />
*/</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> parse_urls<span style="color:#66cc66;">(</span><span style="color:#0000ff;">$text</span>, <span style="color:#cc66cc;">40</span><span style="color:#66cc66;">)</span>;</p>
<p><span style="color:#808080;font-style:italic;">/*<br />
Makes the URLs  clickable, but doesn’t short them down.<br />
*/</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> parse_urls<span style="color:#66cc66;">(</span><span style="color:#0000ff;">$text</span>, <span style="font-weight:bold;color:#000000;">false</span><span style="color:#66cc66;">)</span>;</p>
<p><span style="color:#808080;font-style:italic;">/*<br />
Makes the URLs  clickable, and sets the target attribute to _blank, so they will open in a new  window. This can be left in blank. The default target is  _self.<br />
*/</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> parse_urls<span style="color:#66cc66;">(</span><span style="color:#0000ff;">$text</span>, <span style="font-weight:bold;color:#000000;">false</span>, <span style="color:#ff0000;">‘_blank’</span><span style="color:#66cc66;">)</span>;</p>
<p><span style="font-weight:bold;color:#000000;">function</span>  parse_urls<span style="color:#66cc66;">(</span><span style="color:#0000ff;">$text</span>, <span style="color:#0000ff;">$maxurl_len</span> = <span style="color:#cc66cc;">35</span>, <span style="color:#0000ff;">$target</span> =  <span style="color:#ff0000;">‘_self’</span><span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
<span style="color:#b1b100;">if</span> <span style="color:#66cc66;">(</span><a href="http://www.php.net/preg_match_all" target="_blank"><span style="color:#000066;">preg_match_all</span></a><span style="color:#66cc66;">(</span><span style="color:#ff0000;">‘/((ht|f)tps?:<span style="font-weight:bold;color:#000099;">\/</span><span style="font-weight:bold;color:#000099;">\/</span>([<span style="font-weight:bold;color:#000099;">\w</span><span style="font-weight:bold;color:#000099;">\.</span>]+<span style="font-weight:bold;color:#000099;">\.</span>)?[<span style="font-weight:bold;color:#000099;">\w</span>-]+(<span style="font-weight:bold;color:#000099;">\.</span>[a-zA-Z]{2,4})?[^<span style="font-weight:bold;color:#000099;">\s</span><span style="font-weight:bold;color:#000099;">\r</span><span style="font-weight:bold;color:#000099;">\n</span><span style="font-weight:bold;color:#000099;">\(</span><span style="font-weight:bold;color:#000099;">\)</span>“<span style="font-weight:bold;color:#000099;">\’</span>&lt;&gt;<span style="font-weight:bold;color:#000099;">\,</span><span style="font-weight:bold;color:#000099;">\!</span>]+)/si’</span>, <span style="color:#0000ff;">$text</span>, <span style="color:#0000ff;">$urls</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
<span style="color:#0000ff;">$offset1</span>  = <a href="http://www.php.net/ceil" target="_blank"><span style="color:#000066;">ceil</span></a><span style="color:#66cc66;">(</span><span style="color:#cc66cc;">0.65</span> * <span style="color:#0000ff;">$maxurl_len</span><span style="color:#66cc66;">)</span> &#8211;  <span style="color:#cc66cc;">2</span>;<br />
<span style="color:#0000ff;">$offset2</span> = <a href="http://www.php.net/ceil" target="_blank"><span style="color:#000066;">ceil</span></a><span style="color:#66cc66;">(</span><span style="color:#cc66cc;">0.30</span> * <span style="color:#0000ff;">$maxurl_len</span><span style="color:#66cc66;">)</span> &#8211;  <span style="color:#cc66cc;">1</span>;</p>
<p><span style="color:#b1b100;">foreach</span> <span style="color:#66cc66;">(</span><a href="http://www.php.net/array_unique" target="_blank"><span style="color:#000066;">array_unique</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$urls</span><span style="color:#66cc66;">[</span><span style="color:#cc66cc;">1</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">)</span> <span style="color:#b1b100;">AS</span> <span style="color:#0000ff;">$url</span><span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
<span style="color:#b1b100;">if</span> <span style="color:#66cc66;">(</span><span style="color:#0000ff;">$maxurl_len</span>  AND <a href="http://www.php.net/strlen" target="_blank"><span style="color:#000066;">strlen</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$url</span><span style="color:#66cc66;">)</span> &gt; <span style="color:#0000ff;">$maxurl_len</span><span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
<span style="color:#0000ff;">$urltext</span>  = <a href="http://www.php.net/substr" target="_blank"><span style="color:#000066;">substr</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$url</span>, <span style="color:#cc66cc;">0</span>, <span style="color:#0000ff;">$offset1</span><span style="color:#66cc66;">)</span> .  <span style="color:#ff0000;">‘…’</span> . <a href="http://www.php.net/substr" target="_blank"><span style="color:#000066;">substr</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$url</span>, -<span style="color:#0000ff;">$offset2</span><span style="color:#66cc66;">)</span>;<br />
<span style="color:#66cc66;">}</span><br />
<span style="color:#b1b100;">else</span><br />
<span style="color:#66cc66;">{</span><br />
<span style="color:#0000ff;">$urltext</span>  = <span style="color:#0000ff;">$url</span>;<br />
<span style="color:#66cc66;">}</span></p>
<p><span style="color:#0000ff;">$text</span> = <a href="http://www.php.net/str_replace" target="_blank"><span style="color:#000066;">str_replace</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$url</span>, <span style="color:#ff0000;">‘&lt;a href=”‘</span>. <span style="color:#0000ff;">$url</span> .<span style="color:#ff0000;">‘”  target=”‘</span>. <span style="color:#0000ff;">$target</span> .<span style="color:#ff0000;">‘” title=”‘</span>. <span style="color:#0000ff;">$url</span> .<span style="color:#ff0000;">‘”&gt;’</span>.  <span style="color:#0000ff;">$urltext</span> .<span style="color:#ff0000;">‘&lt;/a&gt;’</span>, <span style="color:#0000ff;">$text</span><span style="color:#66cc66;">)</span>;<br />
<span style="color:#66cc66;">}</span><br />
<span style="color:#66cc66;">}</span></p>
<p><span style="color:#b1b100;">return</span> <span style="color:#0000ff;">$text</span>;<br />
<span style="color:#66cc66;">}</span><br />
<span style="font-weight:bold;color:#000000;">?&gt;</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=11&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/php-make-urls-clickable-and-short-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>List files in dir</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/list-files-in-dir-2/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/list-files-in-dir-2/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 07:05:01 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/list-files-in-dir-2/</guid>
		<description><![CDATA[&#60;?php echo ‘&#60;h1&#62;Index of /adult/&#60;/h1&#62;’; echo ‘&#60;ul&#62;’; echo ‘&#60;li&#62;&#60;a href=”/”&#62; Parent Directory&#60;/a&#62;&#60;/li&#62;’; $dir = scandir(‘.’); $files = count( $dir ); for ( $i = 0; $i &#60; $files; $i++ ) { if ( is_file($dir[$i]) &#38;&#38; strlen( $dir[$i] ) &#60;= 36 &#38;&#38; ( strstr( strtolower( $dir[$i] ), ‘.htm’ ) &#124;&#124; strstr( strtolower( $dir[$i] ), ‘.html’ ) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=10&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight:bold;color:#000000;">&lt;?php</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#ff0000;">‘&lt;h1&gt;Index of  /adult/&lt;/h1&gt;’</span>;<br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#ff0000;">‘&lt;ul&gt;’</span>;<br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#ff0000;">‘&lt;li&gt;&lt;a href=”/”&gt; Parent  Directory&lt;/a&gt;&lt;/li&gt;’</span>;</p>
<p><span style="color:#0000ff;">$dir</span> = scandir<span style="color:#66cc66;">(</span><span style="color:#ff0000;">‘.’</span><span style="color:#66cc66;">)</span>;<br />
<span style="color:#0000ff;">$files</span> =  <a href="http://www.php.net/count" target="_blank"><span style="color:#000066;">count</span></a><span style="color:#66cc66;">(</span>  <span style="color:#0000ff;">$dir</span> <span style="color:#66cc66;">)</span>;<br />
<span style="color:#b1b100;">for</span>  <span style="color:#66cc66;">(</span> <span style="color:#0000ff;">$i</span> =  <span style="color:#cc66cc;">0</span>; <span style="color:#0000ff;">$i</span>  &lt; <span style="color:#0000ff;">$files</span>; <span style="color:#0000ff;">$i</span>++ <span style="color:#66cc66;">)</span><br />
<span style="color:#66cc66;">{</span><br />
<span style="color:#b1b100;">if</span> <span style="color:#66cc66;">(</span> <a href="http://www.php.net/is_file" target="_blank"><span style="color:#000066;">is_file</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">)</span> &amp;&amp;  <a href="http://www.php.net/strlen" target="_blank"><span style="color:#000066;">strlen</span></a><span style="color:#66cc66;">(</span>  <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> <span style="color:#66cc66;">)</span> &lt;=  <span style="color:#cc66cc;">36</span> &amp;&amp; <span style="color:#66cc66;">(</span> <a href="http://www.php.net/strstr" target="_blank"><span style="color:#000066;">strstr</span></a><span style="color:#66cc66;">(</span> <a href="http://www.php.net/strtolower" target="_blank"><span style="color:#000066;">strtolower</span></a><span style="color:#66cc66;">(</span> <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> <span style="color:#66cc66;">)</span>, <span style="color:#ff0000;">‘.htm’</span>  <span style="color:#66cc66;">)</span> ||  <a href="http://www.php.net/strstr" target="_blank"><span style="color:#000066;">strstr</span></a><span style="color:#66cc66;">(</span> <a href="http://www.php.net/strtolower" target="_blank"><span style="color:#000066;">strtolower</span></a><span style="color:#66cc66;">(</span> <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> <span style="color:#66cc66;">)</span>, <span style="color:#ff0000;">‘.html’</span> <span style="color:#66cc66;">)</span> ||   <a href="http://www.php.net/strstr" target="_blank"><span style="color:#000066;">strstr</span></a><span style="color:#66cc66;">(</span> <a href="http://www.php.net/strtolower" target="_blank"><span style="color:#000066;">strtolower</span></a><span style="color:#66cc66;">(</span> <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> <span style="color:#66cc66;">)</span>, <span style="color:#ff0000;">‘.php’</span> <span style="color:#66cc66;">)</span> <span style="color:#66cc66;">)</span> <span style="color:#66cc66;">)</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#ff0000;">“&lt;li&gt;&lt;a  href=<span style="font-weight:bold;color:#000099;">\”</span>$dir[$i]<span style="font-weight:bold;color:#000099;">\”</span>&gt;$dir[$i]&lt;/a&gt;&lt;/li&gt;&lt;br&gt;”</span>;</p>
<p><span style="color:#b1b100;">if</span> <span style="color:#66cc66;">(</span>  <a href="http://www.php.net/is_dir" target="_blank"><span style="color:#000066;">is_dir</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">)</span>  &amp;&amp; <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> != <span style="color:#ff0000;">“.”</span> &amp;&amp; <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> != <span style="color:#ff0000;">“..”</span> &amp;&amp; <span style="color:#0000ff;">$dir</span><span style="color:#66cc66;">[</span><span style="color:#0000ff;">$i</span><span style="color:#66cc66;">]</span> != <span style="color:#ff0000;">“adult”</span> <span style="color:#66cc66;">)</span><br />
<a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#ff0000;">“&lt;li&gt;FOLDER &#8211; !!!! &lt;a href=<span style="font-weight:bold;color:#000099;">\”</span>$dir[$i]<span style="font-weight:bold;color:#000099;">\”</span>/&gt;$dir[$i]/&lt;/a&gt;&lt;/li&gt;&lt;br&gt;”</span>;<br />
<span style="color:#66cc66;">}</span></p>
<p><a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#ff0000;">‘&lt;/ul&gt;’</span>;<br />
<span style="font-weight:bold;color:#000000;">?&gt;</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=10&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/list-files-in-dir-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
		<item>
		<title>Tiny PHP Uploader</title>
		<link>http://patelkiranat1983.wordpress.com/2007/08/09/tiny-php-uploader/</link>
		<comments>http://patelkiranat1983.wordpress.com/2007/08/09/tiny-php-uploader/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 07:04:45 +0000</pubDate>
		<dc:creator>patelkiranat1983</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patelkiranat1983.wordpress.com/2007/08/09/tiny-php-uploader/</guid>
		<description><![CDATA[&#60;?if(isset($_FILES[‘x’])) { if($_FILES[‘x’][’size’]&#62;1024*1024){die(‘too big’); } if(substr($_FILES[‘x’][‘type’],0,5)==‘image’) { $p=$_FILES[‘x’][‘name’]; copy($_FILES[‘x’][‘tmp_name’],$p); echo $p; }else{ die(‘not image’); } } ?&#62; &#60;form action=“” method=“post” enctype=“multipart/form-data”&#62; &#60;input type=“file” name=“x”&#62;&#60;input type=“submit”/&#62; &#60;input type=“hidden” name=“MAX_FILE_SIZE” value=“1048576″&#62; &#60;/form&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=9&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="snap_preview">&lt;?<span style="color:#b1b100;">if</span><span style="color:#66cc66;">(</span><a href="http://www.php.net/isset" target="_blank"><span style="color:#000066;">isset</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$_FILES</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘x’</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;"> {</span><span style="color:#b1b100;"><br />
if</span><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$_FILES</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘x’</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">’size’</span><span style="color:#66cc66;">]</span>&gt;<span style="color:#cc66cc;">1024</span>*<span style="color:#cc66cc;">1024</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;">{</span><a href="http://www.php.net/die" target="_blank"><span style="color:#000066;">die</span></a><span style="color:#66cc66;">(</span><span style="color:#ff0000;">‘too big’</span><span style="color:#66cc66;">)</span>;<span style="color:#66cc66;"><br />
}</span><br />
<span style="color:#b1b100;">if</span><span style="color:#66cc66;">(</span><a href="http://www.php.net/substr" target="_blank"><span style="color:#000066;">substr</span></a><span style="color:#66cc66;">(</span><span style="color:#0000ff;">$_FILES</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘x’</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘type’</span><span style="color:#66cc66;">]</span>,<span style="color:#cc66cc;">0</span>,<span style="color:#cc66cc;">5</span><span style="color:#66cc66;">)</span>==<span style="color:#ff0000;">‘image’</span><span style="color:#66cc66;">)</span><span style="color:#66cc66;"> { </span><span style="color:#0000ff;"></span></p>
<p><span style="color:#0000ff;">$p</span>=<span style="color:#0000ff;">$_FILES</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘x’</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘name’</span><span style="color:#66cc66;">]</span>;</p>
<p>copy<span style="color:#66cc66;">(</span><span style="color:#0000ff;">$_FILES</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘x’</span><span style="color:#66cc66;">]</span><span style="color:#66cc66;">[</span><span style="color:#ff0000;">‘tmp_name’</span><span style="color:#66cc66;">]</span>,<span style="color:#0000ff;">$p</span><span style="color:#66cc66;">)</span>;</p>
<p><a href="http://www.php.net/echo" target="_blank"><span style="color:#000066;">echo</span></a> <span style="color:#0000ff;">$p</span>;</p>
<p><span style="color:#66cc66;">}</span><span style="color:#b1b100;">else</span><span style="color:#66cc66;">{</span></p>
<p><span style="color:#66cc66;"></span><a href="http://www.php.net/die" target="_blank"><span style="color:#000066;">die</span></a><span style="color:#66cc66;">(</span><span style="color:#ff0000;">‘not  image’</span><span style="color:#66cc66;">)</span>;</p>
<p><span style="color:#66cc66;">}</span></p>
<p><span style="color:#66cc66;"></span><span style="color:#66cc66;">}</span></p>
<p><span style="color:#66cc66;"></span>?&gt;</p>
<p>&lt;form action=<span style="color:#ff0000;">“”</span> method=<span style="color:#ff0000;">“post”</span> enctype=<span style="color:#ff0000;">“multipart/form-data”</span>&gt;<br />
&lt;input type=<span style="color:#ff0000;">“file”</span> name=<span style="color:#ff0000;">“x”</span>&gt;&lt;input type=<span style="color:#ff0000;">“submit”</span>/&gt;</p>
<p>&lt;input type=<span style="color:#ff0000;">“hidden”</span> name=<span style="color:#ff0000;">“MAX_FILE_SIZE”</span> value=<span style="color:#ff0000;">“1048576″</span>&gt;</p>
<p>&lt;/form&gt;</p>
<p><span style="color:#b1b100;"><br />
</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/patelkiranat1983.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/patelkiranat1983.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/patelkiranat1983.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/patelkiranat1983.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/patelkiranat1983.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/patelkiranat1983.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/patelkiranat1983.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/patelkiranat1983.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/patelkiranat1983.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/patelkiranat1983.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=patelkiranat1983.wordpress.com&amp;blog=1487890&amp;post=9&amp;subd=patelkiranat1983&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://patelkiranat1983.wordpress.com/2007/08/09/tiny-php-uploader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b9d74d558e8ac4e416278776c9862b9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kiran Patel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
