<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Nilesh - LAMP</title>
	<atom:link href="http://prajapatinilesh.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://prajapatinilesh.wordpress.com</link>
	<description>Welcome to my site ..... (Kem Chho Bhai ?)</description>
	<lastBuildDate>Thu, 25 Jun 2009 09:08:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='prajapatinilesh.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/30826b2aa59a80dd3c9cfef88e50adba?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Nilesh - LAMP</title>
		<link>http://prajapatinilesh.wordpress.com</link>
	</image>
			<item>
		<title>Javascript + Array sort on Key</title>
		<link>http://prajapatinilesh.wordpress.com/2009/06/25/javascript-array-sort-on-key/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/06/25/javascript-array-sort-on-key/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 09:08:09 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=215</guid>
		<description><![CDATA[Hi,
Please follow following example to understand the problem.
&#60;script&#62;
function keySort(array, flag) {
var keys = new Array();
for(k in array) {
keys.push(k);
}
keys.sort( function (a, b) {
if (flag &#38;&#38; flag != &#8216;undefined&#8217;) {
if(flag == &#8216;integer&#8217;) {
a = parseInt(a);
b = parseInt(b);
}
}
return (a &#62; b) &#8211; (a &#60; b);
} );
return keys;
}//End of function keySort
/*jsArray = new Array();
jsArray['A'] = &#8216;Test1&#8242;;
jsArray['Z'] = &#8216;Test3&#8242;;
jsArray['P'] = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=215&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi,</p>
<p>Please follow following example to understand the problem.</p>
<p>&lt;script&gt;<br />
function keySort(array, flag) {<br />
var keys = new Array();</p>
<p>for(k in array) {<br />
keys.push(k);<br />
}</p>
<p>keys.sort( function (a, b) {<br />
if (flag &amp;&amp; flag != &#8216;undefined&#8217;) {<br />
if(flag == &#8216;integer&#8217;) {<br />
a = parseInt(a);<br />
b = parseInt(b);<br />
}<br />
}<br />
return (a &gt; b) &#8211; (a &lt; b);<br />
} );</p>
<p>return keys;<br />
}//End of function keySort</p>
<p>/*jsArray = new Array();<br />
jsArray['A'] = &#8216;Test1&#8242;;<br />
jsArray['Z'] = &#8216;Test3&#8242;;<br />
jsArray['P'] = &#8216;Test4&#8242;;<br />
jsArray['U'] = &#8216;Test2&#8242;;<br />
jsArray['B'] = &#8216;Test5&#8242;;*/</p>
<p>jsArray = new Array();<br />
jsKeyArray = new Array();</p>
<p>jsArray[80] = &#8216;nil1&#8242;;<br />
jsArray[120] = &#8216;nil2&#8242;;<br />
jsArray[160] = &#8216;nil3&#8242;;</p>
<p>for (x in jsArray) {<br />
alert(x + &#8216; &#8211;&gt; &#8216; + jsArray[x]);<br />
}</p>
<p>jsKeyArray = keySort(jsArray);</p>
<p>/*for (x in jsKeyArray) {<br />
alert(x + &#8216; &#8211;&gt; &#8216; + jsKeyArray[x]);<br />
}*/</p>
<p>//It will display wrong result&#8230;.<br />
for (var i = 0; i &lt; jsKeyArray.length; i++) {<br />
alert(jsKeyArray[i] + &#8216; &#8211;&gt; &#8216; + jsArray[jsKeyArray[i]]);<br />
}</p>
<p>jsKeyArray = keySort(jsArray, &#8216;integer&#8217;);</p>
<p>//correct result&#8230;.<br />
for (var i = 0; i &lt; jsKeyArray.length; i++) {<br />
alert(jsKeyArray[i] + &#8216; (integer) &#8211;&gt; &#8216; + jsArray[jsKeyArray[i]]);<br />
}</p>
<p>//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>//Value integer sorting&#8230;..</p>
<p>function sortASC(a, b){ return (a-b); }<br />
function sortDESC(a, b){ return (b-a); }</p>
<p>integerArray = new Array(1,545,1435,3453,342,441,90);</p>
<p>integerArray.sort( sortASC );<br />
document.write(&#8216; &lt;br /&gt; Ascending : &#8216; + integerArray);</p>
<p>integerArray.sort( sortDESC );<br />
document.write(&#8216; &lt;br /&gt; Descending : &#8216; + integerArray );</p>
<p>&lt;/script&gt;</p>
<p>Thanks,</p>
<p>Nilesh Prajapati</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=215&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/06/25/javascript-array-sort-on-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to refresh the parent window on closing the child window ?</title>
		<link>http://prajapatinilesh.wordpress.com/2009/05/17/how-to-refresh-the-parent-window-on-closing-the-child-window/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/05/17/how-to-refresh-the-parent-window-on-closing-the-child-window/#comments</comments>
		<pubDate>Sun, 17 May 2009 18:25:04 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=210</guid>
		<description><![CDATA[Hi,
Demo Example:
1) parent.php
&#60;html&#62;
&#60;head&#62; &#60;title&#62;Parent Window&#60;/title&#62;
&#60;script language=&#8221;javascript&#8221;&#62;
window.name = &#8216;parentWindow&#8217;;
var newPopupWindow;
function popupLinkOption(url,width,height) {
newPopupWindow=window.open(url,&#8221;childWindow&#8221;,&#8221;height=&#8221;+height+&#8221;,width=&#8221;+width+&#8221;,left=100,top=100,resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,location=no&#8221;);
}
&#60;/script&#62;
&#60;/head&#62;
&#60;body&#62;
Parent File &#60;br /&#62;
&#60;a href=&#8221;#&#8221; onclick=&#8221;popupLinkOption(&#8216;child.php&#8217;,200,200);&#8221;&#62; Popup &#60;/a&#62;
&#60;?php
if ($_GET['rId']) {
echo &#8220;&#60;br /&#62;Rendom Id &#8211;&#62;&#8221;.$_GET['rId'];
}
?&#62;
&#60;/body&#62;
&#60;/html&#62;
&#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;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
2) child.php
&#60;html&#62;
&#60;head&#62; &#60;title&#62;Child Window&#60;/title&#62;
&#60;script language=&#8221;javascript&#8221;&#62;
function refreshParent() {
//here window.opener is the parent window from which child window opened.
parentURL = window.opener.location.href;
if (parentURL &#38;&#38; parentURL != &#8216;undefined&#8217;) {
//alert(window.opener.location.href + &#8216; &#8212; &#8216; + window.opener.location);
//alert(window.opener.name);
parentURLArr = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=210&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi,</p>
<p>Demo Example:</p>
<p>1) parent.php</p>
<p>&lt;html&gt;<br />
&lt;head&gt; &lt;title&gt;Parent Window&lt;/title&gt;<br />
&lt;script language=&#8221;javascript&#8221;&gt;<br />
window.name = &#8216;parentWindow&#8217;;<br />
var newPopupWindow;<br />
function popupLinkOption(url,width,height) {<br />
newPopupWindow=window.open(url,&#8221;childWindow&#8221;,&#8221;height=&#8221;+height+&#8221;,width=&#8221;+width+&#8221;,left=100,top=100,resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,location=no&#8221;);<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
Parent File &lt;br /&gt;<br />
&lt;a href=&#8221;#&#8221; onclick=&#8221;popupLinkOption(&#8216;child.php&#8217;,200,200);&#8221;&gt; Popup &lt;/a&gt;<br />
&lt;?php<br />
if ($_GET['rId']) {<br />
echo &#8220;&lt;br /&gt;Rendom Id &#8211;&gt;&#8221;.$_GET['rId'];<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</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;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>2) child.php</p>
<p>&lt;html&gt;<br />
&lt;head&gt; &lt;title&gt;Child Window&lt;/title&gt;<br />
&lt;script language=&#8221;javascript&#8221;&gt;<br />
function refreshParent() {<br />
//here window.opener is the parent window from which child window opened.<br />
parentURL = window.opener.location.href;<br />
if (parentURL &amp;&amp; parentURL != &#8216;undefined&#8217;) {<br />
//alert(window.opener.location.href + &#8216; &#8212; &#8216; + window.opener.location);<br />
//alert(window.opener.name);<br />
parentURLArr = parentURL.split(&#8216;#&#8217;);</p>
<p>//find last characters from the string means # as we have href=&#8217;#&#8217; in parent window link<br />
//newStr = parentURL.substring(0, parentURL.length-1);<br />
//alert(newStr);</p>
<p>parentURLArr1 = parentURLArr[0].split(&#8216;?rId=&#8217;);<br />
//alert(parentURLArr1[0]);</p>
<p>qStr = &#8216;?rId=&#8217;+Math.random(); //random Id added here becuase it will not take page from the browser cache.. sometimes required for some browser.</p>
<p>window.opener.location.href = parentURLArr1[0] + qStr;</p>
<p>//window.opener.location.href = window.opener.location.href; //this also used to refresh the parent window.<br />
//window.opener.location.reload(); //this also we can add to reload the parent window.<br />
//window.opener.close(); //parent open closing<br />
}<br />
}</p>
<p>function closeChild() {<br />
window.close();<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body onunload=&#8221;refreshParent();&#8221; &gt;<br />
Child File &lt;br /&gt;<br />
&lt;a href=&#8221;#&#8221; onclick=&#8221;closeChild();&#8221;&gt; Close Child&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>This is just demo with alert and other things. so, can check in your local pc.. and you can modified code as per your requirements. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Run parent.php file to check this exmple.</p>
<p>Thanks,</p>
<p>Nilesh Prajapati.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=210&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/05/17/how-to-refresh-the-parent-window-on-closing-the-child-window/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript function to get particular querystring value from URL.</title>
		<link>http://prajapatinilesh.wordpress.com/2009/05/11/javascript-function-to-get-particular-querystring-value-from-url/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/05/11/javascript-function-to-get-particular-querystring-value-from-url/#comments</comments>
		<pubDate>Mon, 11 May 2009 10:44:56 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=205</guid>
		<description><![CDATA[Hi,
function getQueryStrVal(url,name) {
name = name.replace(/[\[]/,&#8221;\\\[").replace(/[\]]/,&#8221;\\\]&#8221;);
var regexS = &#8220;[\\?&#38;]&#8220;+name+&#8221;=([^&#38;#]*)&#8221;;
var regex = new RegExp( regexS );
var results = null;
if (url &#38;&#38; url != &#8216;undefined&#8217;) {
results = regex.exec( url );
}
else {
results = regex.exec( window.location.href );
}
if( results == null )
return &#8220;&#8221;;
else
return results[1];
}
How to use:
here url is your js variable in which your whole url is defined.
if(url.indexOf(&#8216;prefixVal&#8217;) != -1) {
prefixVal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=205&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi,</p>
<p>function getQueryStrVal(url,name) {<br />
name = name.replace(/[\[]/,&#8221;\\\[").replace(/[\]]/,&#8221;\\\]&#8221;);<br />
var regexS = &#8220;[\\?&amp;]&#8220;+name+&#8221;=([^&amp;#]*)&#8221;;<br />
var regex = new RegExp( regexS );<br />
var results = null;<br />
if (url &amp;&amp; url != &#8216;undefined&#8217;) {<br />
results = regex.exec( url );<br />
}<br />
else {<br />
results = regex.exec( window.location.href );<br />
}<br />
if( results == null )<br />
return &#8220;&#8221;;<br />
else<br />
return results[1];<br />
}</p>
<p>How to use:</p>
<p>here url is your js variable in which your whole url is defined.</p>
<p>if(url.indexOf(&#8216;prefixVal&#8217;) != -1) {</p>
<p>prefixVal = getQueryStrVal(url, &#8216;prefixVal&#8217;);</p>
<p>alert(prefixVal);</p>
<p>}</p>
<p>Thanks,</p>
<p>Nilesh prajapati.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=205&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/05/11/javascript-function-to-get-particular-querystring-value-from-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Process the uploaded file in php instead of storing it into physical location</title>
		<link>http://prajapatinilesh.wordpress.com/2009/05/08/process-the-uploaded-file-in-php-instead-of-storing-it-into-physical-location/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/05/08/process-the-uploaded-file-in-php-instead-of-storing-it-into-physical-location/#comments</comments>
		<pubDate>Fri, 08 May 2009 11:28:26 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=201</guid>
		<description><![CDATA[Hi,
We are using   move_uploaded_file($_FILES['myFile']['tmp_name'], &#8216;/upload_files/myFile.txt&#8217;);   function in php to upload files into physical location (destination directory).
But in case if you want to process that uploaded file instead of storing it into destination directory then we can use other php function for file handling.
For example:
if (is_uploaded_file($_FILES['myFile']['tmp_name']))
$fileData = file_get_contents($_FILES['myFile']['tmp_name']);
$fileData = str_replace(&#8220;A&#8221;, &#8220;B&#8221;, $fileData); 
OR
if file size is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=201&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi,<br />
We are using   <span class="codeText">move_uploaded_file($_FILES['myFile']['tmp_name'], &#8216;/upload_files/myFile.txt&#8217;);   function in php to upload files into physical location (destination directory).</span><br />
But in case if you want to process that uploaded file instead of storing it into destination directory then we can use other php function for file handling.<br />
For example:</p>
<p><span class="codeText">if (is_uploaded_file($_FILES['myFile']['tmp_name']))<br />
$fileData = file_get_contents($_FILES['myFile']['tmp_name']);</span></p>
<p><span class="codeText">$fileData = str_replace(&#8220;A&#8221;, &#8220;B&#8221;, $fileData);</span><span class="codeText"> </span></p>
<p><span class="codeText">OR</span><br />
<span class="codeText">if file size is large then better to use following way: means use of diff file handling functions of php </span><span class="mainText"> such as <em>fopen()</em>, <em>feof()</em>, <em>fclose()</em>, etc.</span></p>
<p><span class="codeText">if (is_uploaded_file($_FILES['myFile']['tmp_name'])) {<br />
$filePointer = fopen($_FILES['myFile']['tmp_name'], &#8220;rb&#8221;);</span><br />
if ($filePointer!=false){<br />
while (!feof($filePointer)){<br />
$fileData = fread($filePointer, 4096);<br />
// Process the contents of the uploaded file here&#8230; and also we can make insert query to store into db<br />
}<br />
fclose($filePointer);<br />
}</p>
<p>}</p>
<p><span class="codeText">Working Example:</span></p>
<p>&lt;?php<br />
if ($_FILES) {<br />
echo &#8220;&lt;pre&gt;&#8221;;<br />
print_r($_FILES);<br />
echo &#8220;&lt;/pre&gt;&#8221;;</p>
<p>$fileContent = file_get_contents($_FILES['upload']['tmp_name']);<br />
echo &#8220;&lt;pre&gt;&#8221;;<br />
print_r($fileContent);<br />
echo &#8220;&lt;/pre&gt;&#8221;;<br />
//now you can process your content here&#8230;<br />
die;<br />
}<br />
?&gt;</p>
<p>&lt;form enctype=&#8221;multipart/form-data&#8221; method=&#8221;POST&#8221;&gt;<br />
&lt;input type=&#8221;file&#8221; name=&#8221;upload&#8221;&gt;<br />
&lt;button type=&#8221;submit&#8221;&gt;Enter&lt;/button&gt;<br />
&lt;/form&gt;<br />
<span class="codeText">Thanks,   Nilesh.<br />
</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=201&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/05/08/process-the-uploaded-file-in-php-instead-of-storing-it-into-physical-location/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Get all dates between two dates using php code.</title>
		<link>http://prajapatinilesh.wordpress.com/2009/05/07/get-all-dates-between-two-dates-using-php-code/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/05/07/get-all-dates-between-two-dates-using-php-code/#comments</comments>
		<pubDate>Thu, 07 May 2009 08:19:17 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=199</guid>
		<description><![CDATA[&#60;?php
$fromDate = &#8216;01/01/2009&#8242;;
$toDate = &#8216;01/10/2009&#8242;;
$dateMonthYearArr = array();
$fromDateTS = strtotime($fromDate);
$toDateTS = strtotime($toDate);
for ($currentDateTS = $fromDateTS; $currentDateTS &#60;= $toDateTS; $currentDateTS += (60 * 60 * 24)) {
// use date() and $currentDateTS to format the dates in between
$currentDateStr = date(&#8220;Y-m-d&#8221;,$currentDateTS);
$dateMonthYearArr[] = $currentDateStr;
//print $currentDateStr.&#8221;&#60;br /&#62;&#8221;;
}
echo  &#8220;&#60;pre&#62;&#8221;;
print_r($dateMonthYearArr);
echo &#8220;&#60;/pre&#62;&#8221;;
?&#62;
Thanks,
Nilesh Prajapati.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=199&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&lt;?php<br />
$fromDate = &#8216;01/01/2009&#8242;;<br />
$toDate = &#8216;01/10/2009&#8242;;</p>
<p>$dateMonthYearArr = array();<br />
$fromDateTS = strtotime($fromDate);<br />
$toDateTS = strtotime($toDate);</p>
<p>for ($currentDateTS = $fromDateTS; $currentDateTS &lt;= $toDateTS; $currentDateTS += (60 * 60 * 24)) {<br />
// use date() and $currentDateTS to format the dates in between<br />
$currentDateStr = date(&#8220;Y-m-d&#8221;,$currentDateTS);<br />
$dateMonthYearArr[] = $currentDateStr;<br />
//print $currentDateStr.&#8221;&lt;br /&gt;&#8221;;<br />
}</p>
<p>echo  &#8220;&lt;pre&gt;&#8221;;<br />
print_r($dateMonthYearArr);<br />
echo &#8220;&lt;/pre&gt;&#8221;;<br />
?&gt;</p>
<p>Thanks,<br />
Nilesh Prajapati.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=199&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/05/07/get-all-dates-between-two-dates-using-php-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Lightwindow using jquery javascript</title>
		<link>http://prajapatinilesh.wordpress.com/2009/05/05/lightwindow-using-jquery-javascript/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/05/05/lightwindow-using-jquery-javascript/#comments</comments>
		<pubDate>Tue, 05 May 2009 11:14:30 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=197</guid>
		<description><![CDATA[Hi,
I found that jquery is providing good and easy way to use lighwindow (thikbox).
Following is link which explained how to use lightwindow (thikbox) using jquery.
http://jquery.com/demo/thickbox/#sectiond-2
If you will find problem for flash player during lightwindow, means lightwindow will not overlap on the flash player then try with following:

To the Object tag, add the following parameter (opaque [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=197&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi,</p>
<p>I found that jquery is providing good and easy way to use lighwindow (thikbox).</p>
<p>Following is link which explained how to use lightwindow (thikbox) using jquery.</p>
<p>http://jquery.com/demo/thickbox/#sectiond-2</p>
<p>If you will find problem for flash player during lightwindow, means lightwindow will not overlap on the flash player then try with following:</p>
<ol>
<li>To the Object tag, add the following parameter (opaque is shown as an example):<br />
<span class="code">&lt;param name=&#8221;wmode&#8221; value=&#8221;opaque&#8221;&gt; </span></li>
<li>To the Embed tag, add the following attribute:<br />
<span class="code">wmode=&#8221;opaque&#8221;</span></li>
</ol>
<p>Reference link:  http://www.communitymx.com/content/article.cfm?cid=E5141</p>
<p>Thanks,<br />
Nilesh</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=197&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/05/05/lightwindow-using-jquery-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Image area map html elements</title>
		<link>http://prajapatinilesh.wordpress.com/2009/04/20/image-area-map-html-elements/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/04/20/image-area-map-html-elements/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 08:21:16 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=193</guid>
		<description><![CDATA[The &#60;map&#62; tag is used to define a client-side image-map. An image-map is an image with clickable areas.
The name attribute is required in the map element. This attribute is associated with the &#60;img&#62;&#8217;s usemap attribute and creates a relationship between the image and the map.
The map element contains a number of area elements, that defines [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=193&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The &lt;map&gt; tag is used to define a client-side image-map. An image-map is an image with clickable areas.<br />
The name attribute is required in the map element. This attribute is associated with the &lt;img&gt;&#8217;s usemap attribute and creates a relationship between the image and the map.<br />
The map element contains a number of area elements, that defines the clickable areas in the image map.<br />
Example:<br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;p&gt;Click on the sun or on one of the planets to watch it closer:&lt;/p&gt;<br />
&lt;img src=&#8221;planets.gif&#8221; width=&#8221;145&#8243; height=&#8221;126&#8243; alt=&#8221;Planets&#8221; usemap=&#8221;#planetmap&#8221; /&gt;<br />
&lt;map name=&#8221;planetmap&#8221;&gt;<br />
&lt;area shape=&#8221;rect&#8221; coords=&#8221;0,0,82,126&#8243; alt=&#8221;Sun&#8221; href=&#8221;sun.htm&#8221; /&gt;<br />
&lt;area shape=&#8221;circle&#8221; coords=&#8221;90,58,3&#8243; alt=&#8221;Mercury&#8221; href=&#8221;mercur.htm&#8221; /&gt;<br />
&lt;area shape=&#8221;circle&#8221; coords=&#8221;124,58,8&#8243; alt=&#8221;Venus&#8221; href=&#8221;venus.htm&#8221; /&gt;<br />
&lt;/map&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
This is a beautiful feature to map the image on particular coordinates. so, we can use this kind of map during jpgraph generation or any use and we can put javascript tooltip to display imformation on particular point of image.</p>
<p>Thanks,<br />
Nilesh</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=193&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/04/20/image-area-map-html-elements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Overlap Div &#8211; z-index use in css html</title>
		<link>http://prajapatinilesh.wordpress.com/2009/04/11/overlap-div-z-index-use-in-css-html/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/04/11/overlap-div-z-index-use-in-css-html/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 15:20:09 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[Css]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=191</guid>
		<description><![CDATA[&#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62;
&#60;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243; /&#62;
&#60;title&#62;Z-Index &#8211; Overlap DIV Example&#60;/title&#62;
&#60;style type=&#8221;text/css&#8221;&#62;
&#60;!&#8211;
body,td,th {
font-family: Georgia, Times New Roman, Times, serif;
}
div.div1 {
position: absolute;
top: 20px; left: 20px;
height: 250px; width: 250px;
color: white;
background-color: blue;
z-index: 1;}
div.div2 {
position: absolute;
top: 150px; left: 10px;
height: 100px; width: 300px;
background-color: #EB7CA7;
z-index: 20;}
div.div3 {
position: absolute;
top: 15px; left: 175px;
height: 125px; width: 125px;
background-color: yellow;
z-index: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=191&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=iso-8859-1&#8243; /&gt;<br />
&lt;title&gt;Z-Index &#8211; Overlap DIV Example&lt;/title&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
&lt;!&#8211;<br />
body,td,th {<br />
font-family: Georgia, Times New Roman, Times, serif;<br />
}<br />
div.div1 {<br />
position: absolute;<br />
top: 20px; left: 20px;<br />
height: 250px; width: 250px;<br />
color: white;<br />
background-color: blue;<br />
z-index: 1;}<br />
div.div2 {<br />
position: absolute;<br />
top: 150px; left: 10px;<br />
height: 100px; width: 300px;<br />
background-color: #EB7CA7;<br />
z-index: 20;}<br />
div.div3 {<br />
position: absolute;<br />
top: 15px; left: 175px;<br />
height: 125px; width: 125px;<br />
background-color: yellow;<br />
z-index: 10;}<br />
&#8211;&gt;<br />
&lt;/style&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div class=&#8221;div1&#8243;&gt;Div #1 &lt;/div&gt;<br />
&lt;div class=&#8221;div2&#8243;&gt;Div #2 &lt;/div&gt;<br />
&lt;div class=&#8221;div3&#8243;&gt;Div #3 &lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Note: If we will increase z-index value in css div then it will take that div at top of all other div.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=191&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/04/11/overlap-div-z-index-use-in-css-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>hosts file setting.</title>
		<link>http://prajapatinilesh.wordpress.com/2009/04/08/hosts-file-setting/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/04/08/hosts-file-setting/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 17:04:16 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[Web server]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=188</guid>
		<description><![CDATA[Location of host file:
C:\WINDOWS.0\system32\drivers\etc\    &#8212; hosts
Host file is used to bind the site url with our ip address.
example:
&#60;ip_address&#62;  testurl.com  (http://testurl.com/)  www.testurl.com.
Statrt &#62;&#62; Run &#62;&#62; cmd &#62;&#62;
ipconfig &#8212; to check ip address of our pc.
C:/&#62;ipconfig /help
C:/&#62; ipconfig /displaydns
C:\&#62;ipconfig /flushdns
C:\&#62;ipconfig /renew
If you will find error during the flush dns then apply following steps:
C:\&#62;ipconfig /flushdns
Windows IP Configuration
Could not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=188&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Location of host file:<br />
C:\WINDOWS.0\system32\drivers\etc\    &#8212; hosts<br />
Host file is used to bind the site url with our ip address.<br />
example:<br />
&lt;ip_address&gt;  testurl.com  (http://testurl.com/)  www.testurl.com.<br />
Statrt &gt;&gt; Run &gt;&gt; cmd &gt;&gt;<br />
ipconfig &#8212; to check ip address of our pc.<br />
C:/&gt;ipconfig /help<br />
C:/&gt; ipconfig /displaydns<br />
C:\&gt;ipconfig /flushdns<br />
C:\&gt;ipconfig /renew<br />
If you will find error during the flush dns then apply following steps:<br />
C:\&gt;ipconfig /flushdns<br />
Windows IP Configuration<br />
Could not flush the DNS Resolver Cache: Function failed during execution.<br />
Solution:<br />
1) Click Start<br />
2) Click RUN<br />
3) Type services.msc in the text box<br />
4) Click OK or hit Enter<br />
5) Scroll down to DNS Client and double click it<br />
6) Select General tab and select Startup type: Automatic or manual<br />
7) Click Apply<br />
 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Finally at Service Status Click Start (if it is stopped)  //click on start</p>
<p>Thanks,<br />
Nilesh Prajapati.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=188&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/04/08/hosts-file-setting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Manually Set PHP Session Timeout &#8212; PHP Session</title>
		<link>http://prajapatinilesh.wordpress.com/2009/01/14/manually-set-php-session-timeout-php-session/</link>
		<comments>http://prajapatinilesh.wordpress.com/2009/01/14/manually-set-php-session-timeout-php-session/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 08:47:38 +0000</pubDate>
		<dc:creator>prajapatinilesh</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://prajapatinilesh.wordpress.com/?p=170</guid>
		<description><![CDATA[To find out what the default (file-based-sessions) session timeout value on the server is you can view it through a ini_get command:
// Get the current Session Timeout Value
$currentTimeoutInSecs = ini_get(’session.gc_maxlifetime’);
Change the Session Timeout Value
// Change the session timeout value to 30 minutes  // 8*60*60 = 8 hours
ini_set(’session.gc_maxlifetime’, 30*60);
//&#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;&#8212;&#8212;&#8211;

// php.ini setting required for session timeout.
ini_set(&#8217;session.gc_maxlifetime&#8217;,30);
ini_set(&#8217;session.gc_probability&#8217;,1);
ini_set(&#8217;session.gc_divisor&#8217;,1);
//&#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;&#8212;&#8212;&#8211;
//if you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=170&subd=prajapatinilesh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To find out what the default (file-based-sessions) session timeout value on the server is you can view it through a <strong>ini_get</strong> command:</p>
<blockquote><p>// Get the current Session Timeout Value<br />
<strong>$currentTimeoutInSecs = ini_get(’session.gc_maxlifetime’);</strong></p></blockquote>
<p>Change the Session Timeout Value</p>
<blockquote><p>// Change the session timeout value to 30 minutes  // 8*60*60 = 8 hours<br />
<strong>ini_set(’session.gc_maxlifetime’, 30*60);</strong><br />
<strong>//&#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;&#8212;&#8212;&#8211;<br />
</strong></p></blockquote>
<p>// php.ini setting required for session timeout.</p>
<p>ini_set(&#8217;session.gc_maxlifetime&#8217;,30);<br />
ini_set(&#8217;session.gc_probability&#8217;,1);<br />
ini_set(&#8217;session.gc_divisor&#8217;,1);<br />
<strong>//&#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;&#8212;&#8212;&#8211;</strong><br />
//if you want to change the  <strong>session.cookie_lifetime.</strong><br />
//This required in some common file because to get the session values in whole application we need to write session_start();  to each file then only will get $_SESSION global variable values.</p>
<p>$sessionCookieExpireTime=8*60*60;<br />
session_set_cookie_params($sessionCookieExpireTime);<br />
session_start();</p>
<p>// Reset the expiration time upon page load //session_name() is default name of session PHPSESSID</p>
<p>if (isset($_COOKIE[session_name()]))<br />
setcookie(session_name(), $_COOKIE[session_name()], time() + $sessionCookieExpireTime, &#8220;/&#8221;);<br />
<strong>//&#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;&#8212;&#8212;&#8211;</strong><br />
//To get the session cookie set param values.</p>
<p>$CookieInfo = session_get_cookie_params();</p>
<p>echo &#8220;&lt;pre&gt;&#8221;;<br />
echo &#8220;Session information session_get_cookie_params function :: &lt;br /&gt;&#8221;;<br />
print_r($CookieInfo);<br />
echo &#8220;&lt;/pre&gt;&#8221;;<br />
<strong>//&#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;&#8212;&#8212;&#8211;</strong><br />
Some Description of session related setting for php.ini file.</p>
<dl>
<dt><strong><span class="term"><var class="parameter">session.gc_maxlifetime</var> <span class="type">integer</span> </span></strong> </dt>
<dd><code class="literal">session.gc_maxlifetime</code> specifies the number of  seconds after which data will be seen as &#8216;garbage&#8217; and cleaned up. Garbage  collection occurs during session start. </dd>
</dl>
<dl>
<dt><strong><span class="term"><var class="parameter">session.cookie_lifetime</var> <span class="type">integer</span> </span></strong> </dt>
<dd><code class="literal">session.cookie_lifetime</code> specifies the lifetime of  the cookie in seconds which is sent to the browser. The value 0 means &#8220;until the  browser is closed.&#8221; Defaults to <code class="literal">0</code>. See also <strong>session_get_cookie_params()</strong> and <strong>session_set_cookie_params()</strong>. Since the cookie is returned  by the browser, it is not prolonged to suffice the lifetime. It must be sent  manually by <strong class="function">setcookie()</strong>.</dd>
</dl>
<p>Thanks,<br />
Nilesh Prajapati.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prajapatinilesh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prajapatinilesh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prajapatinilesh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prajapatinilesh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prajapatinilesh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prajapatinilesh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prajapatinilesh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prajapatinilesh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prajapatinilesh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prajapatinilesh.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prajapatinilesh.wordpress.com&blog=1033097&post=170&subd=prajapatinilesh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://prajapatinilesh.wordpress.com/2009/01/14/manually-set-php-session-timeout-php-session/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4162a7c9609bb4dcde5bd2f421f8ccf8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prajapatinilesh</media:title>
		</media:content>
	</item>
	</channel>
</rss>