<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4457726433086600396</id><updated>2011-11-27T15:47:47.942-08:00</updated><category term='nanhe'/><category term='programmer'/><category term='php'/><title type='text'>Nanhe Kumar</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-4960885177595229048</id><published>2011-02-08T04:55:00.000-08:00</published><updated>2011-02-08T04:55:10.656-08:00</updated><title type='text'>how can instal java and run java program</title><content type='html'>download java &lt;br /&gt;Go to http://java.sun.com/javase/downloads/index.jsp&lt;br /&gt;and clik on Java Platform (JDK)&lt;br /&gt;and install it&lt;br /&gt;&lt;br /&gt;Second step:&lt;br /&gt;write you code &lt;br /&gt;Example:&lt;br /&gt;class Example&lt;br /&gt;{&lt;br /&gt; public static void main(String args[])&lt;br /&gt; {&lt;br /&gt;  System.out.println("This is Example class");&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Suppose you java installation path is &lt;br /&gt;C:\Program Files\Java&lt;br /&gt;&lt;br /&gt;save it C:\Program Files\Java\jdk1.6.0_23\bin\Example.java&lt;br /&gt;&lt;br /&gt;Then click start-&gt;run&lt;br /&gt;then write cmd or command&lt;br /&gt;Then type cd\ (enter)&lt;br /&gt;c:\&gt; cd Program Files (enter)&lt;br /&gt;c:\Program Files&gt; cd Java (enter)&lt;br /&gt;c:\Program Files\Java&gt; cd jdk1.6.0_23 (enter)&lt;br /&gt;c:\Program Files\Java\jdk1.6.0_23&gt; cd bin (enter)&lt;br /&gt;Now run you java program&lt;br /&gt;&lt;br /&gt;c:\Program Files\Java\jdk1.6.0_23\bin&gt; javac Example.java&lt;br /&gt;c:\Program Files\Java\jdk1.6.0_23\bin&gt; java Example&lt;br /&gt;&lt;br /&gt;It is simple you face any problem then you can submit cooment&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-4960885177595229048?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/4960885177595229048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2011/02/how-can-instal-java-and-run-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/4960885177595229048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/4960885177595229048'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2011/02/how-can-instal-java-and-run-java.html' title='how can instal java and run java program'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-752495935468852760</id><published>2010-12-20T05:36:00.000-08:00</published><updated>2010-12-20T05:36:54.178-08:00</updated><title type='text'>Authorize.Net Direct Post Method (DPM)</title><content type='html'>you can find more detail of Authorize.Net Direct Post Method (DPM) on &lt;a href="http://www.articlesrain.com/tutorial/index.php/2010/12/authorize-net-direct-post-method-dpm/"&gt;http://www.articlesrain.com/tutorial/index.php/2010/12/authorize-net-direct-post-method-dpm/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-752495935468852760?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/752495935468852760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2010/12/authorizenet-direct-post-method-dpm.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/752495935468852760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/752495935468852760'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2010/12/authorizenet-direct-post-method-dpm.html' title='Authorize.Net Direct Post Method (DPM)'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-8424103691936798001</id><published>2010-04-28T05:27:00.000-07:00</published><updated>2010-04-28T05:27:12.975-07:00</updated><title type='text'>How to add days, weeks, months to any date ?</title><content type='html'>$date = date("Y-m-d");// current date&lt;br /&gt;&lt;br /&gt;$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");&lt;br /&gt;$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");&lt;br /&gt;$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");&lt;br /&gt;$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");&lt;br /&gt;$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");&lt;br /&gt;echo date("Y-m-d", $date);//Now your can see added date&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-8424103691936798001?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/8424103691936798001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2010/04/how-to-add-days-weeks-months-to-any.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/8424103691936798001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/8424103691936798001'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2010/04/how-to-add-days-weeks-months-to-any.html' title='How to add days, weeks, months to any date ?'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-5758384129317065570</id><published>2010-02-12T04:42:00.000-08:00</published><updated>2010-02-12T04:42:16.415-08:00</updated><title type='text'>how can login in ilias with own page</title><content type='html'>&lt;form action="lms2/login.php?client_id=" cmd="post&amp;amp;cmdClass=" cmdnode="1&amp;amp;baseClass=" method="post" name="formlogin" rtoken=""&gt;&lt;input name="sendLogin" type="hidden" value="1" /&gt;Suppose my site is&lt;a href="http://www.blogger.com/%3Ca%20href="&gt;http://www.xyz.com/"&amp;gt;www.xyz.com/&lt;/a&gt;ilias is installied on&lt;a href="http://www.blogger.com/%3Ca%20href="&gt;http://www.xyz.com/lms"&amp;gt;www.xyz.com/lms&lt;/a&gt;then you can create your on login page like this&lt;input name="sendLogin" type="hidden" value="1" /&gt;&lt;br /&gt;&lt;table class="std" style="width: 400px;"&gt;&lt;tbody&gt;&lt;tr class="tblheader"&gt;&lt;td class="std" colspan="2"&gt;Login to ILIAS&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="option"&gt;User Name&lt;/td&gt;&lt;td class="option_value"&gt;&lt;input name="username" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="option"&gt;Password&lt;/td&gt;&lt;td class="option_value"&gt;&lt;input name="password" type="password" value="" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="tblfooter"&gt;&lt;td align="middle" class="submit" colspan="2"&gt;&lt;input class="submit" name="butSubmit" type="submit" value="Submit" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/form&gt;//you can also use in another way &lt;br /&gt;&lt;form action="lms2/login.php?client_id=" cmd="post&amp;amp;cmdClass=" cmdnode="1&amp;amp;baseClass=" method="post" name="formlogin" rtoken=""&gt;&lt;input name="sendLogin" type="hidden" value="1" /&gt;&lt;input name="username" type="hidden" value="user" /&gt;&lt;input name="password" type="hidden" value="123456" /&gt;&lt;input src="http://www.blogger.com/%3Ca%20href=" type="image" /&gt;http://www.blogger.com/go1.gif" name="butSubmit"&amp;gt;&lt;/form&gt;/////////////////////This concept is used on gradtrain.com////////////////&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-5758384129317065570?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/5758384129317065570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2010/02/how-can-login-in-ilias-with-own-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5758384129317065570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5758384129317065570'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2010/02/how-can-login-in-ilias-with-own-page.html' title='how can login in ilias with own page'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-2003101047128025421</id><published>2010-02-12T04:41:00.000-08:00</published><updated>2010-02-12T04:41:42.463-08:00</updated><title type='text'>File upload like gmail</title><content type='html'>Step1: Create A file name index.php&lt;br /&gt;File Uploading Like Gmail. You can upload multiple files without submitting the whole page. You can upload file like ajax. This is using iframe for file upload&lt;br /&gt;&lt;br /&gt;&lt;form action="upload.php" enctype="multipart/form-data" method="POST" name="uploadform" target="hiddenframe"&gt;&lt;label&gt;To:  &lt;input id="textfield2" maxlength="60" name="textfield2" size="60" type="text" /&gt;  &lt;br /&gt;&lt;br /&gt;Subject:    &lt;input id="textfield" maxlength="60" name="textfield" size="60" type="text" /&gt;  &lt;br /&gt;&lt;br /&gt;Attach File:  &lt;input id="fileField" name="filefieldname" onchange="document.uploadform.submit()" type="file" /&gt;  &lt;/label&gt;&lt;br /&gt;&lt;div id="uploadedfile"&gt;&lt;label&gt;&lt;/label&gt;&lt;/div&gt;&lt;label&gt;  &lt;input id="button" name="button" type="submit" value="Submit" /&gt;  &lt;/label&gt;&lt;br /&gt;&lt;iframe name="hiddenframe" style="display: none;"&gt;&amp;amp;lt;p&amp;amp;gt;Loading...&amp;amp;lt;/p&amp;amp;gt;&lt;/iframe&gt;&lt;/form&gt;&lt;br /&gt;Step2:create a file upload.php&lt;script&gt;parent.document.getElementById('uploadedfile').innerHTML += '&lt;a href=""&gt;"&gt;&lt;?php echo $_FILES['filefieldname']['name'] ?&gt;&lt;/a&gt;';&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-2003101047128025421?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/2003101047128025421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/file-upload-like-gmail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/2003101047128025421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/2003101047128025421'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/file-upload-like-gmail.html' title='File upload like gmail'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-861399697933928381</id><published>2010-01-12T00:15:00.000-08:00</published><updated>2010-01-12T00:17:32.511-08:00</updated><title type='text'>Check Date Between Two Dates in PHP</title><content type='html'>&lt;?php&lt;br /&gt;&lt;br /&gt;function dateBetween( $checkDate )&lt;br /&gt;{&lt;br /&gt;   $firstDate1 = strtotime( "15-Jan-2008" );&lt;br /&gt;   $firstDate2 = strtotime( "15-Mar-2008" );&lt;br /&gt;   $secondDate1 = strtotime( "16-Mar-2008" );&lt;br /&gt;   $secondDate2 = strtotime( "15-Jun-2008" );&lt;br /&gt;   &lt;br /&gt;   $checkDate = strtotime( $checkDate );&lt;br /&gt;   &lt;br /&gt;   if( $checkDate &gt; $firstDate1 &amp;&amp; $checkDate &lt; $firstDate2 )&lt;br /&gt;   {&lt;br /&gt;      return "2000";&lt;br /&gt;   }&lt;br /&gt;   elseif( $checkDate &gt; $secondDate1 &amp;&amp; $checkDate &lt; $secondDate2 )&lt;br /&gt;   {&lt;br /&gt;      return "4000";&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;   return "0";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;echo dateBetween( "25-Sep-2008" );&lt;br /&gt;&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-861399697933928381?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/861399697933928381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2010/01/check-date-between-two-dates-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/861399697933928381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/861399697933928381'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2010/01/check-date-between-two-dates-in-php.html' title='Check Date Between Two Dates in PHP'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-7138565606857838307</id><published>2009-12-10T03:35:00.000-08:00</published><updated>2009-12-10T03:37:53.934-08:00</updated><title type='text'>How to calculate the date difference between 2 dates using php</title><content type='html'>$date1 = "2006-03-25";&lt;br /&gt;$date2 = "2009-11-10";&lt;br /&gt;&lt;br /&gt;$diff = abs(strtotime($date2) - strtotime($date1));&lt;br /&gt;&lt;br /&gt;$years = floor($diff / (365*60*60*24));&lt;br /&gt;$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));&lt;br /&gt;$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));&lt;br /&gt;&lt;br /&gt;printf("%d years, %d months, %d days\n", $years, $months, $days);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-7138565606857838307?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/7138565606857838307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/12/how-to-calculate-date-difference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7138565606857838307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7138565606857838307'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/12/how-to-calculate-date-difference.html' title='How to calculate the date difference between 2 dates using php'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-1708208667033733510</id><published>2009-09-21T01:09:00.000-07:00</published><updated>2009-09-21T01:11:11.533-07:00</updated><title type='text'>File Handling in php Through Class</title><content type='html'>&lt;?php&lt;br /&gt;class File{&lt;br /&gt; private $fileName;&lt;br /&gt; private $fileMode;&lt;br /&gt; private $filePointer;&lt;br /&gt; private $fileSize;&lt;br /&gt; &lt;br /&gt; public function File($fileName='',$fileMode='',$fileSize=''){&lt;br /&gt;  //echo "&lt;br&gt;Construcor Call&lt;br&gt;";&lt;br /&gt;  if(!empty($fileName))&lt;br /&gt;   $this-&gt;fileName=$fileName;&lt;br /&gt;  if(!empty($fileMode)) &lt;br /&gt;   $this-&gt;fileMode=$fileMode;&lt;br /&gt;  if(empty($fileSize))&lt;br /&gt;   $this-&gt;fileSize=filesize($this-&gt;fileName);&lt;br /&gt;  else&lt;br /&gt;   $this-&gt;fileSize=$fileSize;&lt;br /&gt; }&lt;br /&gt; function FileDetail(){&lt;br /&gt;&lt;br /&gt; echo "&lt;br&gt;fileName[$this-&gt;fileName] fileMode[$this-&gt;fileMode][$this-&gt;filePointer] fileSize[$this-&gt;fileSize]&lt;br&gt;";&lt;br /&gt; }&lt;br /&gt; function FileExists($fileName){&lt;br /&gt;  if(!file_exists($fileName)){&lt;br /&gt;   echo "Error: This file does not exist!";&lt;br /&gt;   exit();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; public function OpenFile(){&lt;br /&gt;  &lt;br /&gt;  if(!$this-&gt;filePointer=fopen($this-&gt;fileName,$this-&gt;fileMode)){&lt;br /&gt;    echo "Cannot open file ($this-&gt;fileName)";&lt;br /&gt;          exit;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; public function CloseFile(){&lt;br /&gt;  fclose($this-&gt;filePointer);&lt;br /&gt; }&lt;br /&gt; public function CheckFileMode($fileMode){&lt;br /&gt; }&lt;br /&gt; public function SetNameSize($fileName='',$fileSize=''){&lt;br /&gt;  &lt;br /&gt;  if(!empty($fileName))&lt;br /&gt;   $this-&gt;fileName=$fileName;&lt;br /&gt;  if(empty($fileSize))&lt;br /&gt;    $this-&gt;fileSize=filesize($this-&gt;fileName);&lt;br /&gt;  else if(gettype($fileSize)=='integer') &lt;br /&gt;   $this-&gt;fileSize=$fileSize;&lt;br /&gt;  else {&lt;br /&gt;    echo "Erro:Invalid File Size only use Integer value!";&lt;br /&gt;    exit();&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; function SetStringSize($string){&lt;br /&gt;   $this-&gt;fileSize=strlen($string);&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; public function SetMode($fileMode){&lt;br /&gt;  &lt;br /&gt;   $this-&gt;fileMode=$fileMode;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; public function ReadFile($fileName='',$fileSize=''){&lt;br /&gt;  $this-&gt;FileExists($fileName);&lt;br /&gt;  $this-&gt;SetNameSize($fileName,$fileSize);&lt;br /&gt;  &lt;br /&gt;  $this-&gt;SetMode('r');&lt;br /&gt;  $this-&gt;OpenFile();&lt;br /&gt;  if($this-&gt;fileSize&gt;0)&lt;br /&gt;   return fread($this-&gt;filePointer,$this-&gt;fileSize);&lt;br /&gt;  else&lt;br /&gt;   return fread($this-&gt;filePointer);&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; public function WriteFile($fileName,$content,$fileSize='',$fileMode='w'){&lt;br /&gt;  $this-&gt;FileExists($fileName);&lt;br /&gt;  $this-&gt;SetNameSize($fileName,$fileSize);&lt;br /&gt;  if(empty($fileSize))&lt;br /&gt;   $this-&gt;SetStringSize($content);&lt;br /&gt;  $this-&gt;SetMode($fileMode);&lt;br /&gt;  $this-&gt;OpenFile();&lt;br /&gt;  if($this-&gt;fileSize&gt;0)&lt;br /&gt;    return fwrite($this-&gt;filePointer,$content,$this-&gt;fileSize);&lt;br /&gt;  else&lt;br /&gt;    return fwrite($this-&gt;filePointer,$content);&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; public function SearchFile($fileName,$content){&lt;br /&gt;  return strpos($this-&gt;ReadFile($fileName),$content);&lt;br /&gt; }&lt;br /&gt; function AppendFile($fileName,$content){&lt;br /&gt;  $this-&gt;FileExists($fileName);&lt;br /&gt;  $this-&gt;SetNameSize($fileName);&lt;br /&gt;  $this-&gt;SetMode('a');&lt;br /&gt;  $this-&gt;OpenFile();&lt;br /&gt;  if($this-&gt;fileSize&gt;0)&lt;br /&gt;    return fwrite($this-&gt;filePointer,$content,$this-&gt;fileSize);&lt;br /&gt;  else&lt;br /&gt;    return fwrite($this-&gt;filePointer,$content);&lt;br /&gt; }&lt;br /&gt; function ReplaceFile($fileName,$search,$replace){&lt;br /&gt;  return $this-&gt;WriteFile($fileName,str_replace($search, $replace,$this-&gt;ReadFile($fileName)));&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;} &lt;br /&gt;?&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;//Class Test&lt;br /&gt;$file=new File();&lt;br /&gt; echo $file-&gt;ReadFile('test.txt);&lt;br /&gt; //$file-&gt;WriteFile('test.txt','this is new text in this file the quick brown fox jumpso over the lazy dog');&lt;br /&gt;//echo $file-&gt;SearchFile('test.txt','love')&lt;br /&gt;//$file-&gt;AppendFile('test.txt','rajput');&lt;br /&gt;//$file-&gt;ReplaceFile('test.txt','rajput','change');&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-1708208667033733510?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/1708208667033733510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/09/file-handling-in-php-through-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/1708208667033733510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/1708208667033733510'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/09/file-handling-in-php-through-class.html' title='File Handling in php Through Class'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-5336091461894760208</id><published>2009-07-19T00:55:00.000-07:00</published><updated>2010-02-17T04:30:13.586-08:00</updated><title type='text'>how can select multiple check box using javascriipt</title><content type='html'>&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;//Nanhe Kumar&lt;br /&gt;&lt;br /&gt;var checkflag = "false";&lt;br /&gt;&lt;br /&gt;function SelectAll(field) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if (checkflag == "false") {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;document.getElementById("selectall").value= 'Unchek All';&lt;br /&gt;&lt;br /&gt;for (i = 0; i &amp;lt; field.length; i++) {&lt;br /&gt;&lt;br /&gt;field[i].checked = true;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;checkflag = "true";&lt;br /&gt;&lt;br /&gt;return "Uncheck All";&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;&lt;br /&gt;document.getElementById("selectall").value= 'Sellect All';&lt;br /&gt;&lt;br /&gt;for (i = 0; i &amp;lt; field.length; i++) {&lt;br /&gt;&lt;br /&gt;field[i].checked = false;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;checkflag = "false";&lt;br /&gt;&lt;br /&gt;return "Select All";&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form method="post" action="" name="formuser" id="formuser" &amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input id="selectall" name="selectall" value="Select All" onclick="SelectAll(document.formuser['uid[]']);" type="checkbox"&amp;gt; Sellect All &amp;lt;br&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="1" type="checkbox"&amp;gt; One&amp;lt;br&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="2" type="checkbox"&amp;gt; two&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="3" type="checkbox"&amp;gt; three&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="4" type="checkbox"&amp;gt; four&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="5" type="checkbox"&amp;gt; five&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="6" type="checkbox"&amp;gt; six&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input name="uid[]" value="7" type="checkbox"&amp;gt; seven&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-5336091461894760208?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/5336091461894760208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/07/how-can-select-multiple-check-box-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5336091461894760208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5336091461894760208'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/07/how-can-select-multiple-check-box-using.html' title='how can select multiple check box using javascriipt'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-6562776860631162629</id><published>2009-07-19T00:49:00.000-07:00</published><updated>2009-07-19T00:50:14.590-07:00</updated><title type='text'>how can on curl mcrypt</title><content type='html'>hi&lt;br /&gt;Go to php.ini file&lt;br /&gt;problem 1 PHP Extension “curl” must be loaded&lt;br /&gt;and find&lt;br /&gt;;extension=php_curl.dll&lt;br /&gt;and remove semicolon&lt;br /&gt;&lt;br /&gt;problem 2 PHP Extension “mcrypt” must be loaded&lt;br /&gt;and fined&lt;br /&gt;;extension=php_mcrypt.dll&lt;br /&gt;&lt;br /&gt;remove semicolon and restart your server&lt;br /&gt;&lt;br /&gt;thanks&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-6562776860631162629?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/6562776860631162629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/07/how-can-on-curl-mcrypt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/6562776860631162629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/6562776860631162629'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/07/how-can-on-curl-mcrypt.html' title='how can on curl mcrypt'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-190673634520560569</id><published>2009-06-11T03:49:00.000-07:00</published><updated>2009-06-11T04:03:48.660-07:00</updated><title type='text'>How can store session in data base</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Step1:&lt;/span&gt; Create A Table:&lt;/span&gt;&lt;br /&gt;CREATE TABLE `sessions` (&lt;br /&gt;`session_key` char(32) NOT NULL,&lt;br /&gt;`session_expire` int(11) unsigned NOT NULL,&lt;br /&gt;`session_value` text NOT NULL,&lt;br /&gt;PRIMARY KEY  (`session_key`)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Step2 :&lt;/span&gt; Create A connection file&lt;/span&gt;&lt;br /&gt;configure.php&lt;br /&gt;&lt;?php&lt;br /&gt; $HOST = "localhost";&lt;br /&gt;    $DBNAME="sessions";&lt;br /&gt;    $USER = "nanhe";&lt;br /&gt;    $PASS = "chapra";&lt;br /&gt; $HANDLER = "";&lt;br /&gt; $LIFETIME = get_cfg_var("session.gc_maxlifetime");&lt;br /&gt;?&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Step3 :&lt;/span&gt; Create handler&lt;/span&gt;&lt;br /&gt;handler.php&lt;br /&gt;&lt;?php&lt;br /&gt;include("configure.php");&lt;br /&gt;        function sessionOpen($save_path, $session_name){&lt;br /&gt;  &lt;br /&gt;        global $HOST, $DBNAME, $USER, $PASS, $HANDLER;&lt;br /&gt;&lt;br /&gt;        if (!$HANDLER = mysql_pconnect($HOST, $USER, $PASS)) {&lt;br /&gt;            echo("&lt;li&gt;Can't connect to $HOST as $USER");&lt;br /&gt;            echo("&lt;li&gt;MySQL Error: ". mysql_error());&lt;br /&gt;            die;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        if (! mysql_select_db($DBNAME, $HANDLER)) {&lt;br /&gt;            echo("&lt;li&gt;We were unable to select database $DBNAME");&lt;br /&gt;            die;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;function sessionClose()&lt;br /&gt;    {&lt;br /&gt;  &lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;function sessionRead($session_key)&lt;br /&gt;    {&lt;br /&gt;        global $session;&lt;br /&gt;        $session_key = addslashes($session_key);&lt;br /&gt;&lt;br /&gt;        $session_session_value =&lt;br /&gt;            mysql_query("SELECT session_value&lt;br /&gt;                         FROM sessions WHERE session_key = '$session_key'")&lt;br /&gt;            or die(mysql_error());&lt;br /&gt;&lt;br /&gt;        if (mysql_numrows($session_session_value) == 1) {&lt;br /&gt;            return mysql_result($session_session_value, 0);&lt;br /&gt;        } else {&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;function sessionWrite($session_key, $val)&lt;br /&gt;    {&lt;br /&gt;        global $session;&lt;br /&gt;echo "The value=".$val;&lt;br /&gt;        $session_key = addslashes($session_key);&lt;br /&gt;        $val = addslashes($val);&lt;br /&gt;        $session = mysql_result(mysql_query("SELECT COUNT(*) FROM sessions&lt;br /&gt;        WHERE session_key = '$session_key'"), 0);&lt;br /&gt;&lt;br /&gt;        if ($session == 0) {&lt;br /&gt;            $return =&lt;br /&gt;                mysql_query("INSERT INTO sessions&lt;br /&gt;                             (session_key, session_expire, session_value)&lt;br /&gt;                             VALUES ('$session_key',&lt;br /&gt;                             UNIX_TIMESTAMP(NOW()), '$val')")&lt;br /&gt;                or die(mysql_error());&lt;br /&gt;        } else {&lt;br /&gt;            $return = mysql_query("UPDATE sessions&lt;br /&gt;                                   SET session_value = '$val',&lt;br /&gt;                                       session_expire = UNIX_TIMESTAMP(NOW())&lt;br /&gt;                                   WHERE session_key = '$session_key'")&lt;br /&gt;                or die(mysql_error());&lt;br /&gt;&lt;br /&gt;            if (mysql_affected_rows() &lt; 0) {&lt;br /&gt;                echo("We were unable to update session&lt;br /&gt;                      session_value for session $session_key");&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        return $return;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function sessionDestroy($session_key)&lt;br /&gt;    {&lt;br /&gt;        global $session;&lt;br /&gt; $session_key = addslashes($session_key);&lt;br /&gt;&lt;br /&gt;        $return = mysql_query("DELETE FROM sessions&lt;br /&gt;                               WHERE session_key = '$session_key'")&lt;br /&gt;            or die(mysql_error());&lt;br /&gt;        return $return;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;function sessionGc($maxlifetime)&lt;br /&gt;    {&lt;br /&gt;        global $session;&lt;br /&gt;        $expirationTime = time() - $maxlifetime;&lt;br /&gt;&lt;br /&gt;        $return = mysql_query("DELETE FROM sessions WHERE session_expire &lt;&lt;br /&gt;   $expirationTime") or die("sessionGc Function".mysql_error());&lt;br /&gt;        return $return;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    session_set_save_handler("sessionOpen", "sessionClose", "sessionRead", "sessionWrite", "sessionDestroy", "sessionGc");&lt;br /&gt; &lt;br /&gt;    &lt;br /&gt;    ?&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;Step4 :&lt;/span&gt; Test your program&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-190673634520560569?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/190673634520560569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/06/how-can-store-session-in-data-base.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/190673634520560569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/190673634520560569'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/06/how-can-store-session-in-data-base.html' title='How can store session in data base'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-3725545097841363347</id><published>2009-05-28T05:57:00.000-07:00</published><updated>2010-02-12T04:41:58.378-08:00</updated><title type='text'>login in ilias with your page</title><content type='html'>&lt;form action="lms2/login.php?client_id=9313648546&amp;amp;cmd=post&amp;amp;cmdClass=ilstartupgui&amp;amp;cmdNode=1&amp;amp;baseClass=ilStartUpGUI&amp;amp;rtoken=" method="post" name="formlogin"&gt;&lt;br /&gt;&lt;input name="sendLogin" type="hidden" value="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table class="std" style="width: 400px;"&gt;&lt;tbody&gt;&lt;tr class="tblheader"&gt; &lt;td class="std" colspan="2"&gt;Login to ILIAS&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td class="option"&gt;User Name&lt;/td&gt; &lt;td class="option_value"&gt;&lt;input name="username" type="text" value="" /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td class="option"&gt;Password&lt;/td&gt; &lt;td class="option_value"&gt;&lt;input name="password" type="password" value="" /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="tblfooter"&gt; &lt;td align="center" class="submit" colspan="2"&gt;&lt;input class="submit" name="butSubmit" type="submit" value="Submit" /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;//You can also login with another way&lt;br /&gt;&lt;form action="lms2/login.php?client_id=9313648546&amp;amp;cmd=post&amp;amp;cmdClass=ilstartupgui&amp;amp;cmdNode=1&amp;amp;baseClass=ilStartUpGUI&amp;amp;rtoken=" method="post" name="formlogin"&gt;&lt;br /&gt;&lt;input name="sendLogin" type="hidden" value="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;input name="username" type="hidden" value="user" /&gt;&lt;br /&gt;&lt;input name="password" type="hidden" value="123456" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;input name="butSubmit" src="go1.gif" type="image" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-3725545097841363347?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/3725545097841363347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/login-in-ilias-with-your-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/3725545097841363347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/3725545097841363347'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/login-in-ilias-with-your-page.html' title='login in ilias with your page'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-1964839943581036685</id><published>2009-05-04T08:35:00.001-07:00</published><updated>2009-05-04T08:35:23.350-07:00</updated><title type='text'>create a blank page in phpbb</title><content type='html'>&lt;?php &lt;br /&gt;/* &lt;br /&gt;*    phpBB3 blank example page. &lt;br /&gt;*/ &lt;br /&gt;&lt;br /&gt;define('IN_PHPBB', true); &lt;br /&gt;$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; &lt;br /&gt;$phpEx = substr(strrchr(__FILE__, '.'), 1); &lt;br /&gt;include($phpbb_root_path . 'common.' . $phpEx); &lt;br /&gt;// Start session management &lt;br /&gt;$user-&gt;session_begin(); &lt;br /&gt;$auth-&gt;acl($user-&gt;data); &lt;br /&gt;$user-&gt;setup('common'); &lt;br /&gt;// include page language file &lt;br /&gt;$user-&gt;add_lang('page'); &lt;br /&gt;page_header($user-&gt;lang['PAGE_TITLE']); &lt;br /&gt;&lt;br /&gt;/* &lt;br /&gt;   Put your own code here &lt;br /&gt;*/ &lt;br /&gt;&lt;br /&gt;$template-&gt;set_filenames(array( &lt;br /&gt;   'body'    =&gt;'nanhe_kumar.html' &lt;br /&gt;)); &lt;br /&gt;// parse page: &lt;br /&gt;page_footer(); &lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-1964839943581036685?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/1964839943581036685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/create-blank-page-in-phpbb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/1964839943581036685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/1964839943581036685'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/create-blank-page-in-phpbb.html' title='create a blank page in phpbb'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-2083569788184834104</id><published>2009-05-04T08:32:00.000-07:00</published><updated>2009-05-04T08:34:30.331-07:00</updated><title type='text'>how can your link session with two sites</title><content type='html'>if you want login in&lt;br /&gt;www.gradtrain.com&lt;br /&gt;and my session is also available in&lt;br /&gt;gradtrain.com/forum&lt;br /&gt;?php&lt;br /&gt;    define('IN_PHPBB', true);&lt;br /&gt;    define('ROOT_PATH', "forum/");&lt;br /&gt;&lt;br /&gt;    if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {&lt;br /&gt;        exit();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    $phpEx = "php";&lt;br /&gt;    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';&lt;br /&gt;    include($phpbb_root_path . 'common.' . $phpEx);&lt;br /&gt;&lt;br /&gt;    $user-&gt;session_begin();&lt;br /&gt;    $auth-&gt;acl($user-&gt;data);&lt;br /&gt;?&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;    $auth-&gt;login('nanhe', 'nanhe', $remember, 1, 0)&lt;br /&gt;?&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;    $user-&gt;session_kill();&lt;br /&gt;    $user-&gt;session_begin();&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-2083569788184834104?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/2083569788184834104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/how-can-your-link-session-with-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/2083569788184834104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/2083569788184834104'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/how-can-your-link-session-with-two.html' title='how can your link session with two sites'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-5252421867521460319</id><published>2009-05-04T08:29:00.000-07:00</published><updated>2009-05-04T08:32:35.676-07:00</updated><title type='text'>how can login in phpbb, forum with own created page</title><content type='html'>Suppose your site is&lt;br /&gt;www.gradtrain.com&lt;br /&gt;and your forum is www.gradtrain.com/forum&lt;br /&gt;and if want login with your crated page&lt;br /&gt;www.gradtrain.com/forum-login.php&lt;br /&gt;then take this step&lt;br /&gt;&lt;?php&lt;br /&gt;define('IN_PHPBB', true);&lt;br /&gt;define('PHPBB_ROOT_PATH', './forum/');&lt;br /&gt;&lt;br /&gt;$phpbb_root_path = 'forum/';&lt;br /&gt;&lt;br /&gt;$phpEx = substr(strrchr(__FILE__, '.'), 1);&lt;br /&gt;include($phpbb_root_path . 'common.' . $phpEx);&lt;br /&gt;include($phpbb_root_path . 'includes/functions_display.' . $phpEx);&lt;br /&gt;&lt;br /&gt;// Start session management&lt;br /&gt;$user-&gt;session_begin();&lt;br /&gt;$auth-&gt;acl($user-&gt;data);&lt;br /&gt;?&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;               /* Start Logout*/&lt;br /&gt;                         if ($user-&gt;data['is_registered']){&lt;br /&gt;                       &lt;br /&gt;                         echo("&lt;form method="'post'" action="'" mode="logout&amp;amp;sid="&gt;data['session_id']."'&gt;");&lt;br /&gt;                         echo("&lt;input type="'submit'" name="'logout'" value="'Logout'"&gt;");&lt;br /&gt;             echo("&lt;input type="'hidden'" name="'redirect'" value="'../index.php'"&gt;");&lt;br /&gt;                         echo("&lt;br /&gt;&lt;/form&gt;");&lt;br /&gt;                         }&lt;br /&gt;                        /*End Logout*/&lt;br /&gt;&lt;br /&gt;                         /*Start Login Box*/&lt;br /&gt;                         if (!$user-&gt;data['is_registered']){&lt;br /&gt;                                    echo("&lt;form method="'post'" action="'" mode="login'"&gt;");&lt;br /&gt;                                    echo(" Username:");&lt;br /&gt;                                    echo("&lt;br /&gt;");&lt;br /&gt;                                    echo(" &lt;input type="'text'" name="'username'" size="'15'" value="''"&gt;");&lt;br /&gt;                                    echo("&lt;br /&gt;&lt;br /&gt;");&lt;br /&gt;                                    echo(" Password:");&lt;br /&gt;                                    echo("&lt;br /&gt;");&lt;br /&gt;                                    echo(" &lt;input type="'password'" name="'password'" size="'15'" value="''"&gt;");&lt;br /&gt;                                    echo("&lt;br /&gt;&lt;br /&gt;");&lt;br /&gt;                                    echo("&lt;input type="'submit'" name="'login'" value="'Login'"&gt;");&lt;br /&gt;                                    echo("&lt;input type="'hidden'" name="'redirect'" value="'../"&gt;");&lt;br /&gt;                                    //echo("&lt;input type="'hidden'" name="'redirect'" value="'gradtrain/forum-login.php'"&gt;");&lt;br /&gt;                                    echo("&lt;br /&gt;&lt;/form&gt;");&lt;br /&gt;                           }&lt;br /&gt;                          /*End Login Box*/&lt;br /&gt;&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-5252421867521460319?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/5252421867521460319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/how-can-login-in-phpbb-forum-with-own.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5252421867521460319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5252421867521460319'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/how-can-login-in-phpbb-forum-with-own.html' title='how can login in phpbb, forum with own created page'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-9097162936446175190</id><published>2009-05-01T04:33:00.000-07:00</published><updated>2009-05-01T04:35:13.500-07:00</updated><title type='text'>The command prompt has been disabled by your administrator</title><content type='html'>&lt;p class="normaltext"&gt;When you attempt to run CMD.exe or  a batch file, you may receive the message "&lt;b&gt;The command prompt has been  disabled by your administrator&lt;/b&gt;". This is caused by  restrictions placed in Registry. &lt;a target="_blank" href="http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en-us/regentry/93465.asp"&gt;DisableCMD&lt;/a&gt; value is set to 1  or via Group Policy. To enable Task Manager, try any of these methods:&lt;/p&gt; &lt;p class="normaltext"&gt;&lt;b&gt;Method 1: Using the console  registry tool&lt;/b&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p class="normaltext"&gt;Click Start, Run and type this command exactly as given below: (better - Copy and paste)&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;form method="post" action="_vti_bin/shtml.dll/disablecmd.htm" onsubmit="" action="--WEBBOT-SELF--"&gt; &lt;!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"   S-Format="TEXT/CSV" S-Label-Fields="TRUE" --&gt;&lt;input name="VTI-GROUP" value="0" type="hidden"&gt;&lt;!--webbot   bot="SaveResults" endspan i-checksum="43374" --&gt; &lt;p align="left"&gt; &lt;input name="T1" size="111" value="REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f" type="text"&gt;&lt;/p&gt; &lt;/form&gt; &lt;p class="normaltext"&gt;&lt;b&gt;Method 2: Edit the registry  directly&lt;/b&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p class="normaltext"&gt;Open Registry Editor (Regedit.exe) and  navigate to:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p class="normaltext"&gt;[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System]&lt;/p&gt; &lt;/blockquote&gt; &lt;ul&gt;&lt;li&gt; &lt;p class="normaltext"&gt;In the right-pane, double-click  DisableCMD and set it's data to 0&lt;br /&gt; &lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p class="normaltext"&gt;&lt;b&gt;Method 3: Using Group Policy Editor in Windows XP Professional.&lt;/b&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p class="normaltext"&gt;Click Start, Run, type gpedit.msc and click OK.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="normaltext"&gt;Navigate to &lt;i&gt;User  Configuration \ Administrative Templates \ System&lt;/i&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p class="normaltext"&gt;Double-click the &lt;b&gt;Prevent  access to the command prompt&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="normaltext"&gt;You can then disable or set the policy to  Not Configured. Disabling or setting this policy to Not Configured should solve the problem.&lt;/p&gt;  &lt;p class="normaltext"&gt;Related articles&lt;/p&gt; &lt;p class="normaltext"&gt; &lt;a target="_self" href="http://windowsxp.mvps.org/tweakuirest.htm"&gt;"Registry Editing has been disabled by your administrator"&lt;/a&gt;&lt;br /&gt;&lt;a target="_self" href="http://windowsxp.mvps.org/Taskmanager_error.htm"&gt;"Task Manager has been disabled by your administrator"&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-9097162936446175190?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/9097162936446175190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/command-prompt-has-been-disabled-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/9097162936446175190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/9097162936446175190'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/05/command-prompt-has-been-disabled-by.html' title='The command prompt has been disabled by your administrator'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-300094977261559675</id><published>2009-04-27T23:16:00.000-07:00</published><updated>2009-04-27T23:18:15.779-07:00</updated><title type='text'>Hide .php extension with url rewriting using .htaccess</title><content type='html'>&lt;p align="justify"&gt;Last time I’ve written an article about &lt;a href="http://roshanbh.com.np/2008/01/hiding-php-file-extension.html" title="hide php file extension"&gt;hiding php file extension&lt;/a&gt; where I’ve showed you how you can use .html or .asp extension of file instead of .php extension. But there was one flaw in that technique you have had to change the file extension explicitly but in this post I’m going to show you how to rewrite the URL instead of renaming the file extension Using this technique you will see product.html in the address bar of the browser but the actual file name remains product.php and you don’t need to rename the file extension. Furthermore you can rewrite the URL like product.php?id=5 to product-5.html.&lt;/p&gt; &lt;p&gt;&lt;span id="more-44"&gt; &lt;/span&gt;&lt;/p&gt; &lt;h4&gt;what is the benefits of rewriting URL?&lt;/h4&gt; &lt;p align="justify"&gt;When a search engine visits the dynamic url like product.php?id=5 it does not give much importance to that URL as search engine sees “?” sign treat it as a url which keeps on changing. so we’re converting the dynamic URL like the product.php?id=5 to static url format like product-5.html. We’ll rewrite the url in such a way that in browser’s address bar it will display as a product-5.html but it actually calls the file product.php?id=5. So that why these kind of URL also named as SEO friendly URL.&lt;/p&gt; &lt;h4&gt;what is required for URL rewriting ??&lt;/h4&gt; &lt;p&gt;To rewrite the URL you must have the &lt;a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html" title="apache's mod_rewrite module" target="_blank"&gt;mod_rewrite&lt;/a&gt; module must be loaded in apache server. And furthermore, FollowSymLinks options also need to be enabled otherwise you may encounter 500 Internal Sever Error. If you don’t know much about mod_rewrite module then please check this post to know &lt;a href="http://roshanbh.com.np/2008/04/check-enable-mod_rewrite-apache.html" title="check and enable mod_rewrite module"&gt;how to check and enable mod_rewrite module in apache?&lt;/a&gt;&lt;/p&gt; &lt;h4&gt;Examples of url rewriting for seo friendly URL&lt;/h4&gt; &lt;p align="justify"&gt;For rewriting the URL, you should create a .htaccess file in the root folder of your web directory. And have to put the following codes as your requirement.&lt;/p&gt; &lt;p&gt;Options +FollowSymlinks&lt;br /&gt;  RewriteEngine on&lt;br /&gt;  RewriteRule ^(.*)\.htm$ $1.php [nc]&lt;/p&gt; &lt;p align="justify"&gt;The following example will rewrite the test.php to test.html i.e when a URL like http://localhost/test.htm is called in address bar it calls the file test.php. As you can see the regular expression in first part of the RewriteRule command and $1 represents the first regular expression of the part of the RewriteRule and [nc] means not case sensitive.&lt;/p&gt; &lt;p&gt;Options +FollowSymlinks&lt;br /&gt;  RewriteEngine on&lt;br /&gt;  RewriteRule ^product-([0-9]+)\.html$ products.php?id=$1&lt;/p&gt; &lt;p align="justify"&gt;The following example will rewrite the product.php?id=5 to porduct-5.html i.e when a URL like http://localhost/product-5.html calls product.php?id=5 automatically.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-300094977261559675?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/300094977261559675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/hide-php-extension-with-url-rewriting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/300094977261559675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/300094977261559675'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/hide-php-extension-with-url-rewriting.html' title='Hide .php extension with url rewriting using .htaccess'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-5461331687289343739</id><published>2009-04-27T23:14:00.001-07:00</published><updated>2010-02-17T04:28:54.743-08:00</updated><title type='text'>How to check and enable mod_rewrite module in apache</title><content type='html'>Well there are lots of technique to check this but I’ll show you a very simple technique to check weather mod_rewrite module is enabled or not in you web server. &lt;p align="justify"&gt;&lt;strong&gt;1) &lt;/strong&gt;Type &lt;?php phpinfo(); ?&gt; in a php file and save it and run that file in the server.&lt;br /&gt;    &lt;strong&gt; 2) &lt;/strong&gt;And now you can the list of information, just search the word “mod_rewrite” from the browser’s search menu&lt;br /&gt;    &lt;strong&gt; 3)&lt;/strong&gt; If it is found under the “Loaded Modules” section then this module is already loaded as you see in the picture below, otherwise you need to go to the next step for enabling mod_rewrite module.&lt;/p&gt; &lt;pre&gt;&lt;a href="http://roshanbh.com.np/wp-content/uploads/2008/04/mod_rewrite.gif" title="mod_rewrite.gif"&gt;&lt;img src="http://roshanbh.com.np/wp-content/uploads/2008/04/mod_rewrite.thumbnail.gif" alt="check mod rewrite module" border="0" width="128" height="79"&gt;&lt;/a&gt;&lt;/pre&gt; &lt;p align="justify"&gt;&lt;strong&gt;How to enable mod_rewrite module in apache in xampp, wamp?&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;Now, I’ll show you how to enable how to mod_rewrite module in apache installed under windows environment.&lt;br /&gt;    &lt;strong&gt; 1) &lt;/strong&gt;Find the “httpd.conf” file under the “conf” folder inside the Apache’s installation folder.&lt;br /&gt;    &lt;strong&gt; 2)&lt;/strong&gt; Find the following line “#LoadModule rewrite_module modules/mod_rewrite.so” in the “httpd.conf” file.You can do this easily by searching the keyword “mod_rewrite” from find menu.&lt;br /&gt;    &lt;strong&gt; 3) &lt;/strong&gt;Remove the “#” at the starting of the line, “#”  represents that line is commented.&lt;br /&gt;    &lt;strong&gt; 4) &lt;/strong&gt;Now  restart the apache server.&lt;br /&gt;    &lt;strong&gt; 5) &lt;/strong&gt;You can see now “mod_rewrite” in the Loaded Module section while doing “phpinfo()”.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-5461331687289343739?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/5461331687289343739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/how-to-check-and-enable-modrewrite_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5461331687289343739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5461331687289343739'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/how-to-check-and-enable-modrewrite_27.html' title='How to check and enable mod_rewrite module in apache'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-7664545672096413323</id><published>2009-04-27T23:14:00.000-07:00</published><updated>2009-04-27T23:16:02.234-07:00</updated><title type='text'>How to check and enable mod_rewrite module in apache</title><content type='html'>Well there are lots of technique to check this but I’ll show you a very simple technique to check weather mod_rewrite module is enabled or not in you web server. &lt;p align="justify"&gt;&lt;strong&gt;1) &lt;/strong&gt;Type &lt;?php phpinfo(); ?&gt; in a php file and save it and run that file in the server.&lt;br /&gt;    &lt;strong&gt; 2) &lt;/strong&gt;And now you can the list of information, just search the word “mod_rewrite” from the browser’s search menu&lt;br /&gt;    &lt;strong&gt; 3)&lt;/strong&gt; If it is found under the “Loaded Modules” section then this module is already loaded as you see in the picture below, otherwise you need to go to the next step for enabling mod_rewrite module.&lt;/p&gt; &lt;pre&gt;&lt;a href="http://roshanbh.com.np/wp-content/uploads/2008/04/mod_rewrite.gif" title="mod_rewrite.gif"&gt;&lt;img src="http://roshanbh.com.np/wp-content/uploads/2008/04/mod_rewrite.thumbnail.gif" alt="check mod rewrite module" border="0" width="128" height="79" /&gt;&lt;/a&gt;&lt;/pre&gt; &lt;p align="justify"&gt;&lt;strong&gt;How to enable mod_rewrite module in apache in xampp, wamp?&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;Now, I’ll show you how to enable how to mod_rewrite module in apache installed under windows environment.&lt;br /&gt;    &lt;strong&gt; 1) &lt;/strong&gt;Find the “httpd.conf” file under the “conf” folder inside the Apache’s installation folder.&lt;br /&gt;    &lt;strong&gt; 2)&lt;/strong&gt; Find the following line “#LoadModule rewrite_module modules/mod_rewrite.so” in the “httpd.conf” file.You can do this easily by searching the keyword “mod_rewrite” from find menu.&lt;br /&gt;    &lt;strong&gt; 3) &lt;/strong&gt;Remove the “#” at the starting of the line, “#”  represents that line is commented.&lt;br /&gt;    &lt;strong&gt; 4) &lt;/strong&gt;Now  restart the apache server.&lt;br /&gt;    &lt;strong&gt; 5) &lt;/strong&gt;You can see now “mod_rewrite” in the Loaded Module section while doing “phpinfo()”.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-7664545672096413323?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/7664545672096413323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/how-to-check-and-enable-modrewrite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7664545672096413323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7664545672096413323'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/how-to-check-and-enable-modrewrite.html' title='How to check and enable mod_rewrite module in apache'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-1791878945313444227</id><published>2009-04-07T02:51:00.000-07:00</published><updated>2009-04-07T02:55:23.400-07:00</updated><title type='text'>ILIAS warning</title><content type='html'>if your pear is working, you also setup php.ini file&lt;br /&gt;if you find error like this&lt;br /&gt;Warning: file(/lang/setup_lang_sel_multi.lang) [function.file]: failed to open  stream: No such file or directory in  /www/htdocs/nrumble/ilias3/setup/classes/class.ilLanguage.php on line 108 &lt;br /&gt;&lt;br /&gt;Warning: file(/lang/setup_en.lang) [function.file]: failed to open  stream: No such file or directory in  /www/htdocs/nrumble/ilias3/setup/classes/class.ilLanguage.php on line 124 &lt;br /&gt;&lt;br /&gt;Warning: parse_ini_file(/setup/ilias.master.ini.php)  [function.parse-ini-file]: failed to open stream: No such file or directory in  /www/htdocs/nrumble/ilias3/setup/classes/class.ilSetup.php on line 144 &lt;br /&gt;&lt;br /&gt;Warning: parse_ini_file(/setup/client.master.ini.php)  [function.parse-ini-file]: failed to open stream: No such file or directory in  /www/htdocs/nrumble/ilias3/setup/classes/class.ilClient.php on line 73 &lt;br /&gt;&lt;br /&gt;Warning: dir(/lang) [function.dir]: failed to open dir: No such file or  directory in /www/htdocs/nrumble/ilias3/setup/classes/class.ilLanguage.php on  line 192&lt;br /&gt;&lt;br /&gt;Warning: chdir() [function.chdir]: No such file or directory  (errno 2) in /www/htdocs/nrumble/ilias3/setup/classes/class.ilLanguage.php on  line 194&lt;br /&gt;&lt;br /&gt;Fatal error: Call to a member function read() on a non-object  in /www/htdocs/nrumble/ilias3/setup/classes/class.ilLanguage.php on line 197&lt;br /&gt;&lt;br /&gt;Answer or this problem&lt;br /&gt;// ADDED BY CDRIGA&lt;br /&gt;   define  ("ILIAS_ABSOLUTE_PATH","/home/myusername/public_html/iliasfolder");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-1791878945313444227?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/1791878945313444227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/ilias-warning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/1791878945313444227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/1791878945313444227'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/ilias-warning.html' title='ILIAS warning'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-7571175145044665149</id><published>2009-04-01T07:24:00.000-07:00</published><updated>2009-04-01T07:25:51.619-07:00</updated><title type='text'>Installing PEAR on Godaddy shared accounts</title><content type='html'>I recently found out how to install PEAR on a &lt;a href="http://godaddy.com/" target="_blank"&gt;Godaddy&lt;/a&gt; shared hosting account.&lt;br /&gt;Visit &lt;a href="http://pear.php.net/go-pear" target="_blank"&gt;http://pear.php.net/go-pear&lt;/a&gt;. Save the text displayed onto your desktop and name it go-pear.php. Upload this to your server. If you’re hosting multiple domains on the account, it’s best that you should upload this file in your root folder. Run this file on your browser and follow the on-screen instructions.&lt;br /&gt;After completing the installation, it is time to edit your php.ini file. If you are running PHP4, there should be a file in the root directory called php.ini. If you are running PHP5, there should be a file in the root directory called php5.ini. If not, create one and add the following: include_path = “.:/usr/local/php5/lib/php:/home/content/s/a/m/sample/html/PEAR”. Keep in mind that /s/a/m/sample is just an example. Doing this will ensure that every page, you create, will look in the PEAR directory so that you it will use the installed packages.&lt;br /&gt;This installation will include Pear_Frontend_Web which is the web-based admin interface. It may have created an index.php file in the directory where PEAR is installed (root). If not you can get a copy from PEAR/docs/PEAR_Frontend_Web/docs/index.php.txt. I would suggest creating a folder called pear_admin in the root directory and storing this file there. If you didn’t install PEAR in the root directory, you may need to edit this file accordingly.&lt;br /&gt;You will need to create a .htaccess and .htpasswd file in the same directory as the index.php file. An example of how the .htaccess file should look as follows:AuthUserFile /home/content/s/a/m/sample/html/pear_admin/.htpasswdAuthType BasicAuthName “Web-based PEAR Frontend”Require valid-user&lt;br /&gt;An example of how the .htpasswd file should look as follows:&lt;br /&gt;admin:cGyUX9QugYMgE&lt;br /&gt;This will create “admin” as the user name and “password” as the password. You can generate your own by going to this link - &lt;a href="http://www.htaccesstools.com/htpasswd-generator/" target="_blank"&gt;http://www.htaccesstools.com/htpasswd-generator/&lt;/a&gt;&lt;br /&gt;Be aware that files beginning with a dot are invisible. You may have to edit your settings on the FTP app you’re using so that you can see them.&lt;br /&gt;Once the files are created and saved, you can now go to http://your-domain.com/pear_admin/index.php. It will ask for the user name and password. Once you are logged in, you can now manage Pear via web browser. That’s it! Now you can run PEAR on a shared account from Godaddy. One less complaint&lt;br /&gt;orignal link :&lt;a href="http://abbyandwin.net/blog/2008/06/16/installing-pear-on-godaddy-shared-accounts/"&gt;http://abbyandwin.net/blog/2008/06/16/installing-pear-on-godaddy-shared-accounts/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-7571175145044665149?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/7571175145044665149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/installing-pear-on-godaddy-shared.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7571175145044665149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7571175145044665149'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/installing-pear-on-godaddy-shared.html' title='Installing PEAR on Godaddy shared accounts'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-7157631990302051127</id><published>2009-04-01T07:22:00.000-07:00</published><updated>2009-04-01T07:24:06.750-07:00</updated><title type='text'>Installing PEAR packages on WAMP</title><content type='html'>Well, after getting caught out recently with PEAR on a client installation, I thought it a good move to write a short tutorial for anyone who needs to install PEAR packages on their WAMP installation.&lt;br /&gt;To start with, for the purposes of this blog, PEAR is a framework for implementing code libraries in PHP.  In other words, it prevents you from having to re-invent the wheel - always a nice thing!&lt;br /&gt;The WAMP installation installs PHP, and at the same time installs the basic PEAR framework.  There is a directory called PEAR inside whatever folder contains PHP - on my particular installation the structure is php5.2.5\PEAR.  Taking a peek inside the PEAR folder will reveal it populated with the basic framework for PEAR.  Most of this you can ignore - I’m not going to detail installing this here - that seems to be well covered.  I just couldn’t find out how to actually enabvle the damn packages when I started, so I hope this is useful!&lt;br /&gt;Checking Configuration&lt;br /&gt;This is THE place where things can go PEAR-shaped, if you’ll allow the pun.  The PEAR folder must be included in the includes path within PHP.INI.  Open PHP.INI and find the line that starts with :&lt;br /&gt;include_path =&lt;br /&gt;or, if commented out&lt;br /&gt;; include_path =&lt;br /&gt;You need to add the path to your PEAR folder to the end of this string.  For example:&lt;br /&gt;include_path = “.;e:\wamp\bin\php\php5.2.5\includes;e:\wamp\bin\php\php5.2.5\PEAR”&lt;br /&gt;Now - it is CRUCIAL that there are NO spaces after or before the semi-colons that separate paths in this string.  If there are, quite simply, PEAR will not work.  Simple as that - any incldue path after such a space will NOT be searched by PHP.&lt;br /&gt;Once you have modified the PHP.INI file, save it and restart your WAMP installation.&lt;br /&gt;Installing a package&lt;br /&gt;First of all, identify the package(s) that you want to install.  To do this, take a look at &lt;a href="http://pear.php.net/packages.php"&gt;http://pear.php.net/packages.php&lt;/a&gt;, which lists the available packages for PEAR.  Identify the ones you’re interested in - for the same of example, let’s deal with a Mailer package.&lt;br /&gt;Click on the relevant section of the Package list, and you’ll see a &lt;a title="PEAR Mail Packages" href="http://pear.php.net/packages.php?catpid=14&amp;amp;catname=Mail"&gt;list of available Mail packages&lt;/a&gt;.  Select the one of interest - choose the package ‘Mail’ and click on it.  This will then display a &lt;a title="Mail Package Details" href="http://pear.php.net/package/Mail"&gt;page of details about the Mail package &lt;/a&gt;- and also the links to download, documentation, etc.  Now, there are two ways to download stuff, depending upon whether you have access to the command line program for PEAR or not.  This blog entry will assume you have - I’ll post the alternative instructions elsewhere.&lt;br /&gt;To start with, make a note of the package name - ‘Mail’.&lt;br /&gt;Check the Dependencies&lt;br /&gt;Click on the ‘Download’ tab - you will see an entry someway down the page for ‘Dependencies’.  These are PEAR packages that you need to install for your chosen package to work.  Make a note of the dependencies - in this case, Net_SMTP.  Now click on that dependency, and check it’s dependencies - do this and you will see Net_Socket and Auth_SASL listed.  The latter is optional, so I won’t bother with that.  There are two other packages listed - however they’re part of the PEAR framework.&lt;br /&gt;So, we now have a list of packages to download and install.  These are:&lt;br /&gt;Mail, Net_SMTP, Net_Socket.  (We’ll ignore the Auth_SASL one for this example).&lt;br /&gt;Whilst you can automate the acquisition of dependencies, it’s educational to do it ‘the hard way’ at first. :)  So that’s what we will do!&lt;br /&gt;Start a Command Window&lt;br /&gt;From your Windows Start menu, select the ‘Run’ entry, and enter ‘cmd.exe’.  Now change directory to the PHP directory.  On my machine this is:&lt;br /&gt;E:\wamp\bin\php\php5.2.5&lt;br /&gt;Once in there, type in pear list.  This will list the currently installed pear packages.  If it’s a new PEAR installation, there will be 3 packages listed 4 packages listed - PEAR, Archie_Tar, Console_Getopt and Structures_graph.&lt;br /&gt;Now, type in pear update-channels.  this connects to the PEAR repository - where the PEAR files live - and updates your local installation with data needed to get packages.&lt;br /&gt;Now, type in:&lt;br /&gt;pear download Mail&lt;br /&gt;pear install Mail&lt;br /&gt;The former command gets a ZIP file containing the Mail package from the PEAR repository, and the latter will install the mail package.  Note the messages displayed on installation - the software warns you that you haven’t got the dependencies, and gives you a suggestion of a method of downloading the dependencies - which we’ll now use to get Net_SMTP an it’s dependencies.&lt;br /&gt;We’ll also do this installation slightly different to the first one - thus showing there is more than one way to install a package.  Type in:&lt;br /&gt;pear install -a Net_SMTP&lt;br /&gt;No download this time - this will go off and get Net_SMTP, and all of it’s dependencies, and install them - all in one fell swoop!  The -a switch tells PEAR to get all the dependencies.&lt;br /&gt;The files will be installed in to the PEAR folder.  Sometiems a PHP file will be placed in the folder itself - as happens with the DB package.  Other times a new folder will be created - like for Mail - and the PHP files placed in the new folder.&lt;br /&gt;Testing the mailer.&lt;br /&gt;Here is a piece of sample code to put in to a PHP file:&lt;?php&lt;br /&gt;require_once “Mail.php”;&lt;br /&gt;$from = “Sender &lt;sender@example.com&gt;”;&lt;br /&gt;$to = “Recipient &lt;recipient@example.com&gt;”;&lt;br /&gt;$subject = “Hi!”;&lt;br /&gt;$body = “Hi,\n\nThis is a test!”;&lt;br /&gt;$host = “mail.example.com”;&lt;br /&gt;$username = “smtp_username”;&lt;br /&gt;$password = “smtp_password”;&lt;br /&gt;$headers = array (’From’ =&gt; $from,&lt;br /&gt;  ’To’ =&gt; $to,&lt;br /&gt;  ’Subject’ =&gt; $subject);&lt;br /&gt;$smtp = Mail::factory(’smtp’,&lt;br /&gt;  array (’host’ =&gt; $host,&lt;br /&gt;    ’auth’ =&gt; true,&lt;br /&gt;    ’username’ =&gt; $username,&lt;br /&gt;    ’password’ =&gt; $password));&lt;br /&gt;$mail = $smtp-&gt;send($to, $headers, $body);&lt;br /&gt;if (PEAR::isError($mail)) {&lt;br /&gt;  echo(”&lt;p&gt;” . $mail-&gt;getMessage() . “&lt;/p&gt;”);&lt;br /&gt; } else {&lt;br /&gt;  echo(”&lt;p&gt;Message successfully sent!&lt;/p&gt;”);&lt;br /&gt; }&lt;br /&gt;?&gt;&lt;br /&gt;Set up your own parameters for the mail server and the authentication required - username and password, and the address of the recipient - and if you have successfully installed PEAR Mail then you should get a mail sent.  If you get any messages back refering to ‘No such file or directory’ then the chances are that the configuration of PHP.INI is a little screwed up. And there you have it!&lt;br /&gt;orignal article : &lt;a href="http://www.joep.communityhost.org.uk/?p=30"&gt;http://www.joep.communityhost.org.uk/?p=30&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-7157631990302051127?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/7157631990302051127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/installing-pear-packages-on-wamp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7157631990302051127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/7157631990302051127'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/04/installing-pear-packages-on-wamp.html' title='Installing PEAR packages on WAMP'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4457726433086600396.post-5192974995204526820</id><published>2009-02-24T21:49:00.000-08:00</published><updated>2009-03-26T06:17:36.414-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nanhe'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='programmer'/><title type='text'>About me</title><content type='html'>Hi..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4457726433086600396-5192974995204526820?l=nanhekumar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nanhekumar.blogspot.com/feeds/5192974995204526820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nanhekumar.blogspot.com/2009/02/about-me.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5192974995204526820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4457726433086600396/posts/default/5192974995204526820'/><link rel='alternate' type='text/html' href='http://nanhekumar.blogspot.com/2009/02/about-me.html' title='About me'/><author><name>Nanhe Kumar</name><uri>http://www.blogger.com/profile/04970698910288650341</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
