<?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:blogger='http://schemas.google.com/blogger/2008' 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-7292930624677787890</id><updated>2024-10-10T04:53:58.315+05:30</updated><category term="database connection class"/><category term="database optimization"/><category term="mysql optimization"/><category term="object oriented class"/><category term="optimize table"/><category term="zend engine architecture"/><title type='text'>AJAX, PHP, MySQL</title><subtitle type='html'>Exclusive PHP,MySQL, Linux, Apache blog for the newbies.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-4875546676073036894</id><published>2013-01-05T18:47:00.002+05:30</published><updated>2013-01-05T18:47:54.538+05:30</updated><title type='text'>Vyatha Katha</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;હે પાર્થ (કર્મચારી),&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;અપ્રાઈઝલ / નથી થયુ, ખરાબ થયુ&lt;br /&gt;ઈન્ક્રીમેન્ટ પણ નથી આવ્યુ ખરાબ થયુ&lt;br /&gt;ઇન્સેન્ટીવ નથી મળ્યુ, એ પણ ખરાબ થઈ રહ્યુ છે.&lt;br /&gt;પગાર કપાઈ રહ્યો છે, ખરાબ થઈ રહ્યું છે.&lt;br /&gt;તું પહેલાના ઈન્સેન્ટીવ મળવાની રાહ ના જો&lt;br /&gt;તું આવનારા ઈન્સેન્ટીવની ચિંતા પણ ના કર&lt;br /&gt;બસ અત્યારના પગારમાં ખુશ રહે,&lt;br /&gt;તારા પાકીટ માં થી શું ગયુ કે રડે છે?&lt;br /&gt;જે આવ્યુ તે અહીં થી જ આવ્યુ હતું.&lt;br /&gt;જ્યારે તું નહોતો ત્યારે પણ આ કંપની ચાલતી હતી&lt;br /&gt;તું છે તોય ચાલે છે, તું જતો રહેશે તોય એ આમ જ ચાલશે…&lt;br /&gt;તું અહીં શું લઈને આવ્યો હતો કે તને ગુમાવવાનું દુખ છે?&lt;br /&gt;જે કાંઈ મળ્યુ એ અહીં જ મળ્યુ&lt;br /&gt;ડીગ્રી લઈને આવ્યો હતો, અનુભવ લઈને જઈશ.&lt;br /&gt;જે કોમ્પ્યુટર આજે તારૂ છે&lt;br /&gt;ગઈકાલે કોઈક બીજાનું હતુ, આવતી કાલે કોઈક બીજાનું હશે&lt;br /&gt;તું એને પોતાનું સમજીને આસક્ત થાય છે, ખુશ થાય છે&lt;br /&gt;આ જ સઘળી પરેશાનીઓનું મૂળ કારણ છે&lt;br /&gt;તું કેમ વ્યર્થ ચિંતા કરે છે…તને કોણ કાઢી શકે છે?&lt;br /&gt;તું નાહકનો જ ડરે છે.&lt;br /&gt;પરિવર્તન એ ઈન્ડસ્ટ્રીનો નિયમ છે&lt;br /&gt;અને આ જ તો તને “પરિવર્તન” નહીં આપવાની ચાલ છે.&lt;br /&gt;અત્યારે તું બેસ્ટ પરફોર્મર છે, કામઢો નંબર વન છે&lt;br /&gt;પણ જો ઈન્ક્રીમેન્ટ માંગીશ તો….&lt;br /&gt;તું વર્સ્ટ પરફોર્મર છે, નકામો નંબર વન છે…&lt;br /&gt;ટારગેટ કદી મેળવી શક્તો નથી…&lt;br /&gt;એપ્રાઈઝલ, ઈન્સેન્ટીવ, પ્રમોશન એ બધુંય મનમાં થી કાઢી નાખ&lt;br /&gt;વિચારો માં થી ય મીટાવી દે…&lt;br /&gt;પછી તું કંપનીનો છે અને કંપની તારી છે,&lt;br /&gt;ન આ ઇન્ક્રીમેન્ટ વગેરે મોહ તારા માટે છે,&lt;br /&gt;કે ના તું આ બધા માટે છે..&lt;br /&gt;બસ અત્યારે તારી નોકરી સુરક્ષીત છે&lt;br /&gt;તો તું શું કામ ચિંતા કરે છે?&lt;br /&gt;તું તારી જાત ને કંપની ને અર્પિત કરી દે,&lt;br /&gt;ઇન્ક્રીમેન્ટ ની ચિંતા ન કર…બસ મન લગાવી ને નોકરી કર…&lt;br /&gt;એ જ સૌથી મોટો ગોલ્ડન રૂલ છે…&lt;br /&gt;જે આ ગોલ્ડન રૂલને જાણે છે તે સુખી છે,&lt;br /&gt;તે આ રિવ્યુ, ઇન્સેન્ટીવ, એપ્રાઈઝલ, પ્રમોશન આદી મોહ ના બંધન માં થી સદા માટે મુક્ત થઈ જાય છે.&lt;br /&gt;તો તું પણ આ મુક્તિ માટે સદા પ્રયત્ન કર&lt;br /&gt;P. S. : છઠ્ઠા પગાર પંચની ભલામણો ય તારા સેક્ટર માં લાગૂ પડ્તી નથી…તે તારી જાણ ખાતર&lt;br /&gt;તારો બોસ (કૃષ્ણ)&lt;br /&gt;- ડૉ. આઈ. કે. વિજળીવાળા&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/4875546676073036894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/4875546676073036894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4875546676073036894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4875546676073036894'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2013/01/vyatha-katha.html' title='Vyatha Katha'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-4788904338370261043</id><published>2007-10-30T19:36:00.000+05:30</published><updated>2007-10-30T19:38:20.786+05:30</updated><title type='text'>How to download file using PHP</title><content type='html'>The following is the code to download file using &lt;b&gt;PHP&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//Author : Mayurika Bhatt&lt;br /&gt;if(isset($_GET[&#39;Action&#39;]) &amp;&amp; $_GET[&#39;Action&#39;] ==&#39;Download&#39;)&lt;br /&gt;{&lt;br /&gt; $speed = 100;&lt;br /&gt; $export_file = &quot;upload/&quot;.$_REQUEST[&#39;file&#39;];&lt;br /&gt; $file_extension = strtolower(substr(strrchr(basename($export_file),&quot;.&quot;),1));&lt;br /&gt; if(file_exists($export_file) &amp;&amp; is_file($export_file) )&lt;br /&gt; {&lt;br /&gt;  switch( $file_extension ) {&lt;br /&gt;  case &quot;exe&quot;:$ctype=&quot;application/octet-stream&quot;;&lt;br /&gt;   break;&lt;br /&gt;  case &quot;zip&quot;:$ctype=&quot;application/zip&quot;;&lt;br /&gt;   break;&lt;br /&gt;  case &quot;mp3&quot;:$ctype=&quot;audio/mpeg&quot;;&lt;br /&gt;   break;&lt;br /&gt;  case &quot;mpg&quot;:$ctype=&quot;video/mpeg&quot;;&lt;br /&gt;   break;&lt;br /&gt;  case &quot;avi&quot;:$ctype=&quot;video/x-msvideo&quot;;&lt;br /&gt;   break;&lt;br /&gt;  // (sensitive stuff, like php files)&lt;br /&gt;  case &quot;doc&quot;:$ctype=&quot;application/msword&quot;;break;&lt;br /&gt;  case &quot;css&quot;:$ctype=&quot;text/plain&quot;;break;&lt;br /&gt;  case &quot;htm&quot;:$ctype=&quot;application/force-download&quot;;break;&lt;br /&gt;  case &quot;html&quot;:$ctype=&quot;application/force-download&quot;;break;&lt;br /&gt;  case &quot;txt&quot;:$ctype=&quot;application/force-download&quot;;break;&lt;br /&gt;  default:&lt;br /&gt;   $ctype=&quot;application/force-download&quot;;&lt;br /&gt;  }&lt;br /&gt;  $filespaces = str_replace(&quot;_&quot;, &quot; &quot;, $export_file);&lt;br /&gt;  header(&quot;Cache-Control:&quot;);&lt;br /&gt;  header(&quot;Cache-Control: public&quot;);&lt;br /&gt;  header(&quot;Content-Type: $ctype&quot;);&lt;br /&gt;  header(&quot;Accept-Ranges: bytes&quot;);&lt;br /&gt;  $size = filesize($export_file); &lt;br /&gt;  &lt;br /&gt;  header(&quot;Content-Length: &quot;.$size);&lt;br /&gt;  header(&#39;Content-Disposition: attachment; filename=&quot;&#39;.basename($filespaces).&#39;&quot;&#39;);&lt;br /&gt;  //open the file&lt;br /&gt;  $fp = fopen($export_file,&quot;rb&quot;);&lt;br /&gt;  //seek to start of missing part &lt;br /&gt;  //start buffered download&lt;br /&gt;  while(!feof($fp)) {  &lt;br /&gt;  //reset time limit for big file&lt;br /&gt;   set_time_limit(0);    &lt;br /&gt;   print(fread($fp,1024*$speed));&lt;br /&gt;   flush();&lt;br /&gt;   sleep(1);&lt;br /&gt;  }&lt;br /&gt;  fclose($fp);&lt;br /&gt;  exit;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;  die(&quot;&lt;b&gt;404 File not found!&lt;/b&gt;&quot;);&lt;br /&gt; }&lt;br /&gt;} &lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/4788904338370261043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/4788904338370261043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4788904338370261043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4788904338370261043'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/how-to-download-file-using-php.html' title='How to download file using PHP'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-4906122408797659403</id><published>2007-10-26T20:21:00.000+05:30</published><updated>2007-11-06T12:08:58.597+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="zend engine architecture"/><title type='text'>Architecture of Zend Engine</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH0uq6owDkDQF_bLcz9zliBKxfEwpgY0P_jSGE3j3kUW7MaEqi9B8WVpjHqjp_n6XGaU5HurIIVWmOfRooJe7xR3mIxJg0miITDbC4auYj0K7jTJuNl90kMoL3kfL4fpr2-ku5DfPjUgwP/s1600-h/zend_archi.gif&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH0uq6owDkDQF_bLcz9zliBKxfEwpgY0P_jSGE3j3kUW7MaEqi9B8WVpjHqjp_n6XGaU5HurIIVWmOfRooJe7xR3mIxJg0miITDbC4auYj0K7jTJuNl90kMoL3kfL4fpr2-ku5DfPjUgwP/s320/zend_archi.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5129607309910111730&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Overview&lt;/span&gt;&lt;br /&gt;Debugging can begin via your browser or directly from the IDE Client. Communication to the Debug Server is by way of your Web server and the Zend EngineTM. Thereafter, interaction between the Debug Server and the IDE Client t&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;akes place throughout the course of a Debug Session.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The IDE Client&lt;/span&gt;&lt;br /&gt;The IDE Client is Zend&#39;s desktop application that enables you to develop your scripts and to interact with the Debug Server. It is comprised of the Zend IDE Desktop (GUI), an editor, &lt;i&gt;Debug&lt;/i&gt; window, Filesystem browser, debug module, and a customization tool.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Debug Via Browser&lt;/span&gt;&lt;br /&gt;A Debug Session is a structured process of debugging one or more script files. Debug sessions are not limited to independent scripts. Beginning with a root script, a Session can continue through one or more nested scripts until it is terminated.&lt;br /&gt;&lt;br /&gt;You can start a Debug Session directly from your browser GUI, by manually defining a set of parameters to the root script&#39;s URL.&lt;br /&gt;&lt;br /&gt;However, the Zend IDE enables you to access your browser from within the IDE Client. In doing so, the assignment of parameters and definition of a cookie will be done automatically.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Debug Server&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The Debug Server is the server-side module that controls the Zend Engine&#39;s execution over the course of a Debug Session. The Debug Server oversees a Debug Session process from beginning to end,meaning that it:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;    Initiates the Session at your command.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;    Executes debugging methods that you choose to apply.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;    Terminates the Debug Session at your command&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The Zend Engine is the internal compiler and runtime engine used by&lt;br /&gt;PHP4. Developed by Zeev Suraski and Andi Gutmans, the Zend Engine is an&lt;br /&gt;abbreviation of their names. In the early days of PHP4, it worked as&lt;br /&gt;follows:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The PHP script was loaded by the Zend Engine and compiled into Zend opcode. Opcodes, short for operation codes, are low level binary instructions. Then the opcode was executed and the HTML generated sent to the client. The opcode was flushed from memory after execution.&lt;br /&gt;Today, there are a multitude of products and techniques to help you speed up this process.&lt;/span&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5D8QjnEyW3LOQ9FWsOSQ_NAbT_v0wUzAo-uv282zSHkahNv7n8ucwww0G6H76zNstY6HOkSRXZVQ_MCT6Jg4YTkxTIpKYgrnQjks8y1yTH5CLi85RzAK6xsol0O1QXKbtTPzyMxyMKOvI/s1600-h/zend1.bmp&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5D8QjnEyW3LOQ9FWsOSQ_NAbT_v0wUzAo-uv282zSHkahNv7n8ucwww0G6H76zNstY6HOkSRXZVQ_MCT6Jg4YTkxTIpKYgrnQjks8y1yTH5CLi85RzAK6xsol0O1QXKbtTPzyMxyMKOvI/s320/zend1.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5129611738021393922&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;              &lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-uopb5XWI8a9V3MD2RtIkQMYbB85PldtBev5qRQ49DrsBxU7mQePst9UCHwnu1lUb74zNYIwnwE_KbNhvz1cDJA8dt51t5qNbEkBQX1_D6gKI63SfjpQ34hAjISpnaHwMxwAFwu9WWmXl/s1600-h/zend2.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-uopb5XWI8a9V3MD2RtIkQMYbB85PldtBev5qRQ49DrsBxU7mQePst9UCHwnu1lUb74zNYIwnwE_KbNhvz1cDJA8dt51t5qNbEkBQX1_D6gKI63SfjpQ34hAjISpnaHwMxwAFwu9WWmXl/s320/zend2.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5129612034374137362&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id=&quot;_x0000_t75&quot; coordsize=&quot;21600,21600&quot; spt=&quot;75&quot; preferrelative=&quot;t&quot; path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; filled=&quot;f&quot; stroked=&quot;f&quot;&gt;  &lt;v:stroke joinstyle=&quot;miter&quot;&gt;  &lt;v:formulas&gt;   &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;&gt;   &lt;v:f eqn=&quot;sum @0 1 0&quot;&gt;   &lt;v:f eqn=&quot;sum 0 0 @1&quot;&gt;   &lt;v:f eqn=&quot;prod @2 1 2&quot;&gt;   &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;&gt;   &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;&gt;   &lt;v:f eqn=&quot;sum @0 0 1&quot;&gt;   &lt;v:f eqn=&quot;prod @6 1 2&quot;&gt;   &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;&gt;   &lt;v:f eqn=&quot;sum @8 21600 0&quot;&gt;   &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;&gt;   &lt;v:f eqn=&quot;sum @10 21600 0&quot;&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok=&quot;f&quot; gradientshapeok=&quot;t&quot; connecttype=&quot;rect&quot;&gt;  &lt;o:lock ext=&quot;edit&quot; aspectratio=&quot;t&quot;&gt; &lt;/v:shapetype&gt;&lt;v:shape id=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot; style=&quot;&#39;width:207.75pt;&quot;&gt;  &lt;v:imagedata src=&quot;file:///C:\DOCUME~1\swaticom\LOCALS~1\Temp\msohtml1\01\clip_image001.png&quot; title=&quot;&quot;&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/4906122408797659403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/4906122408797659403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4906122408797659403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4906122408797659403'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/architecture-of-zend-engine.html' title='Architecture of Zend Engine'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH0uq6owDkDQF_bLcz9zliBKxfEwpgY0P_jSGE3j3kUW7MaEqi9B8WVpjHqjp_n6XGaU5HurIIVWmOfRooJe7xR3mIxJg0miITDbC4auYj0K7jTJuNl90kMoL3kfL4fpr2-ku5DfPjUgwP/s72-c/zend_archi.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-6354083016091080092</id><published>2007-10-25T19:36:00.000+05:30</published><updated>2007-10-25T19:46:56.581+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="database connection class"/><category scheme="http://www.blogger.com/atom/ns#" term="object oriented class"/><title type='text'>Database connection Class</title><content type='html'>Its simple to integrate it.&lt;br /&gt;&lt;br /&gt;use it in the file where you want it to be called.&lt;br /&gt;like in index.php&lt;br /&gt;write this code&lt;br /&gt;//include dbconnection and query class&lt;br /&gt;include_once(&#39;include/connection.php&#39;);&lt;br /&gt;//Database connection&lt;br /&gt;$dbconnect = new DbConnect(HOST,USER,PASS,DATABASE);&lt;br /&gt;$dbconnect-&gt;open();&lt;br /&gt;&lt;br /&gt;$sql = &#39;select * from &#39;.TABLENAME;&lt;br /&gt;//instantiate object of query class&lt;br /&gt;$dbquery = new DbQuery($sql);&lt;br /&gt;$result = $dbquery-&gt;query();&lt;br /&gt;$fetchrow = $dbquery-&gt;fetcharray();&lt;br /&gt;&lt;br /&gt;and so on.&lt;br /&gt;If any bugs please contact me.....&lt;br /&gt;/*&lt;br /&gt;Created By   : Mayurika bhatt&lt;br /&gt;Created On   : 17th Oct,2007&lt;br /&gt;Name                    : connection.php&lt;br /&gt;Functionality  : Connection and query class.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;Class DbConnect &lt;br /&gt;{&lt;br /&gt; var $host = &#39;&#39; ;&lt;br /&gt;  var $user = &#39;&#39;;&lt;br /&gt; var $password = &#39;&#39;;&lt;br /&gt; var $database = &#39;&#39;;&lt;br /&gt; var $persistent = false;&lt;br /&gt; var $conn;&lt;br /&gt;&lt;br /&gt; var $error_reporting = false;&lt;br /&gt;&lt;br /&gt;/*constructor function this will run when we call the class */&lt;br /&gt;&lt;br /&gt;function DbConnect ($host1, $user1, $password1,$database1, $error_reporting=true, $persistent=false) {&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;//pass the hostname, user, password, database names here if static&lt;br /&gt;                $this-&gt;host = $host1;&lt;br /&gt;  $this-&gt;user = $user1;&lt;br /&gt;  $this-&gt;password = $password1;&lt;br /&gt;  $this-&gt;database = $database1;&lt;br /&gt;  $this-&gt;persistent = $persistent;&lt;br /&gt;  $this-&gt;error_reporting = $error_reporting;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function open(){&lt;br /&gt;  if ($this-&gt;persistent) {&lt;br /&gt;   $func = &#39;mysql_pconnect&#39;;&lt;br /&gt;  } else {&lt;br /&gt;   $func = &#39;mysql_connect&#39;;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;/* Connect to the MySQl Server */&lt;br /&gt;&lt;br /&gt;  $this-&gt;conn = $func($this-&gt;host, $this-&gt;user, $this-&gt;password);&lt;br /&gt;  if (!$this-&gt;conn) {&lt;br /&gt;   return false;&lt;br /&gt;  }&lt;br /&gt;/* Select the requested DB */&lt;br /&gt;  &lt;br /&gt;  if (@!mysql_select_db($this-&gt;database, $this-&gt;conn)) {&lt;br /&gt;   return false;&lt;br /&gt;  }&lt;br /&gt;  return true;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;/*close the connection */&lt;br /&gt; &lt;br /&gt; function close() {&lt;br /&gt;  return (@mysql_close($this-&gt;conn));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;/* report error if error_reporting set to true */&lt;br /&gt;&lt;br /&gt; function error() {&lt;br /&gt;  if ($this-&gt;error_reporting) { &lt;br /&gt;   return (mysql_error()) ;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;/* Class to perform query*/&lt;br /&gt;class DbQuery extends DbConnect&lt;br /&gt;{&lt;br /&gt; var $result = &#39;&#39;;&lt;br /&gt; var $sql;&lt;br /&gt; function DbQuery($sql1)&lt;br /&gt; {&lt;br /&gt;  $this-&gt;sql = $sql1;&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; function query() {&lt;br /&gt; &lt;br /&gt;  return $this-&gt;result = mysql_query($this-&gt;sql); &lt;br /&gt;  //return($this-&gt;result != false); &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; function affectedrows() {&lt;br /&gt;  return(@mysql_affected_rows($this-&gt;conn));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function numrows() {&lt;br /&gt;  return(@mysql_num_rows($this-&gt;result));&lt;br /&gt; }&lt;br /&gt; function fetchobject() {&lt;br /&gt;  return(@mysql_fetch_object($this-&gt;result, MYSQL_ASSOC));&lt;br /&gt; }&lt;br /&gt; function fetcharray() {&lt;br /&gt;  return(@mysql_fetch_array($this-&gt;result)); &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function fetchassoc() {&lt;br /&gt;  return(@mysql_fetch_assoc($this-&gt;result));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function freeresult() {&lt;br /&gt;  return(@mysql_free_result($this-&gt;result));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/6354083016091080092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/6354083016091080092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/6354083016091080092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/6354083016091080092'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/database-connection-class.html' title='Database connection Class'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-4892759638416095910</id><published>2007-10-25T18:52:00.000+05:30</published><updated>2007-10-25T19:35:53.304+05:30</updated><title type='text'>Import CSV File using PHP</title><content type='html'>Below is the code to import csv file to MySQL .&lt;br /&gt;&lt;p&gt;It allows you to specify the delimiter in this csv file, whether it is a comma, a tab etc. It also allows you to chose the line separator.&lt;/p&gt; &lt;p&gt;It also permits you to include an empty field at the beginning of each row, which is usually an auto increment integer primary key.&lt;/p&gt; &lt;p&gt;This script is useful mainly if you don&#39;t have or you are a command prompt guy.&lt;br /&gt;Just make sure the table is already created before trying to dump the data.&lt;br /&gt;Kindly post your comments if you got any bug report.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;/* Created By  : &lt;font class=&#39;heading&#39;&gt;Mayurika Bhatt&lt;/font&gt;&lt;br /&gt;Created On   : 25th Oct, 2007&lt;br /&gt;Functionality  : Add News User.&lt;br /&gt;*/&lt;br /&gt;@ob_start();&lt;br /&gt;@session_start();&lt;br /&gt;//include dbconnection and query class&lt;br /&gt;include_once(&#39;include/userfunction.php&#39;);&lt;br /&gt;include(&#39;include/dbconfig.php&#39;);&lt;br /&gt;&lt;br /&gt;//Database connection&lt;br /&gt;$dbconnect = new DbConnect(HOST,USER,PASS,DATABASE);&lt;br /&gt;$dbconnect-&gt;open();&lt;br /&gt;&lt;br /&gt;$databasetable = NEWSUSER;&lt;br /&gt;$fieldseparator = &quot;,&quot;;&lt;br /&gt;$lineseparator = &quot;\n&quot;;&lt;br /&gt;//change the name of the file you want&lt;br /&gt;&lt;br /&gt;$csvfile = &#39;filename&#39;;&lt;br /&gt;&lt;br /&gt;/********************************************************************************************/&lt;br /&gt;/* Would you like to add an empty field at the beginning of these records?&lt;br /&gt;/* This is useful if you have a table with the first field being an auto_increment integer&lt;br /&gt;/* and the csv file does not have such as empty field before the records.&lt;br /&gt;/* Set 1 for yes and 0 for no. ATTENTION: don&#39;t set to 1 if you are not sure.&lt;br /&gt;/* This can dump data in the wrong fields if this extra field does not exist in the table&lt;br /&gt;/********************************************************************************************/&lt;br /&gt;$addauto = 0;&lt;br /&gt;/********************************************************************************************/&lt;br /&gt;if(!file_exists($csvfile)) {&lt;br /&gt; $msg =  &quot;File not found. Make sure you specified the correct path.&lt;br /&gt;&quot;;&lt;br /&gt;}&lt;br /&gt;$file = fopen($csvfile,&quot;r&quot;);&lt;br /&gt;&lt;br /&gt;if(!$file) {&lt;br /&gt; $msg = &quot;Error opening data file.&lt;br /&gt;&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$size = filesize($csvfile);&lt;br /&gt;&lt;br /&gt;if(!$size) {&lt;br /&gt; $msg =  &quot;File is empty.&lt;br /&gt;&quot;;&lt;br /&gt;}&lt;br /&gt;$csvcontent = fread($file,$size);&lt;br /&gt;&lt;br /&gt;fclose($file);&lt;br /&gt;$lines = 0;&lt;br /&gt;$queries = &quot;&quot;;&lt;br /&gt;$inserted = 0;&lt;br /&gt;$linearray = array();&lt;br /&gt;&lt;br /&gt;foreach(split($lineseparator,$csvcontent) as $line) {&lt;br /&gt; $lines++;&lt;br /&gt; $line = trim($line,&quot; \t&quot;);&lt;br /&gt; $line = str_replace(&quot;\r&quot;,&quot;&quot;,$line);&lt;br /&gt; /************************************************************************************************************&lt;br /&gt; This line escapes the special character. remove it if entries are already escaped in the csv file&lt;br /&gt; ************************************************************************************************************/&lt;br /&gt; $line = str_replace(&quot;&#39;&quot;,&quot;\&#39;&quot;,$line);&lt;br /&gt; /***********************************************************************************************************/&lt;br /&gt;&lt;br /&gt; $linearray = explode($fieldseparator,$line);&lt;br /&gt;&lt;br /&gt; if($lines == 1)&lt;br /&gt; {&lt;br /&gt;//first line as the name of the fields&lt;br /&gt;      $first = explode($fieldseparator,$line);&lt;br /&gt; }&lt;br /&gt; if($lines !=1)&lt;br /&gt;{&lt;br /&gt;     $linemysql = implode(&quot;&#39;,&#39;&quot;,$linearray);&lt;br /&gt; &lt;br /&gt;     if($addauto)&lt;br /&gt;         $query = &quot;insert into $databasetable ($user) values(&#39;&#39;,&#39;$linemysql&#39;);&quot;;&lt;br /&gt;     else&lt;br /&gt;         $query = &quot;insert into $databasetable ($user) values(&#39;$linemysql&#39;);&quot;;&lt;br /&gt;&lt;br /&gt;     $queries .= $query . &quot;\n&quot;;&lt;br /&gt; &lt;br /&gt;    $dbquery = new DbQuery($query);&lt;br /&gt;     $resinsert = $dbquery-&gt;insertquery();&lt;br /&gt;    if($resinsert)&lt;br /&gt;     {&lt;br /&gt;        $inserted ++;&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$rec = $lines-1;&lt;br /&gt;if($inserted == $rec)&lt;br /&gt;{&lt;br /&gt; $msg = &quot;Found a total of $rec records in this csv file.&lt;br /&gt;Data inserted successfully&quot;;&lt;br /&gt; header(&#39;location:addnewsuser.php?msg=&#39;.urlencode($msg));&lt;br /&gt; exit;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; $msg .= &quot; Data not inserted successfully&quot;;&lt;br /&gt; header(&#39;location:addnewsuser.php?msg=&#39;.urlencode($msg));&lt;br /&gt; exit;&lt;br /&gt;}&lt;br /&gt;?&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/4892759638416095910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/4892759638416095910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4892759638416095910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4892759638416095910'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/import-csv-file-using-php.html' title='Import CSV File using PHP'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-5780554230878858549</id><published>2007-10-24T12:55:00.001+05:30</published><updated>2007-10-24T12:58:24.868+05:30</updated><title type='text'>Definitions Of PHP</title><content type='html'>&lt;span style=&quot;&quot;&gt;&lt;li&gt;The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases.PHP is a recursive acronym for &quot;PHP Hypertext Preprocessor&quot;. It is an open source, interpretive, HTML centric, server side scripting language. PHP is especially suited for Web development and can be embedded into HTML pages.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=54&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=Oe0r2C_uXxkeIHmf6PR5dg&amp;amp;q=http://orafaq.com/glossary/faqglosp.htm&amp;amp;usg=AFQjCNENoRsI6PXHMj-yuTgCxF9vuFgHUQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;personal home Page, and HTML-embedded scripting language originally designed for simple home page development. PHP has evolved to become an extended scripting language capable of substituting for CGI and SSI.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=55&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=wRvpPl7Yw6yx-llVIQ4qIw&amp;amp;q=http://stronghold.redhat.com/support/docs-3.0/admin_guide/glossary.fm.html&amp;amp;usg=AFQjCNEsc-oj1TmL0uA5u7ASM3wQFyzjlg&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;(Hypertext Preprocessor) open source, server-side HTML scripting languaage used to create dynamic Web pages. PHP is embedded within tags, so the author authorr can move between HTML and PHP instead of using large amounts of code.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=56&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=DoFcG_N7yQugQSlTY8-2dw&amp;amp;q=http://mason.gmu.edu/%7Emontecin/netterms.htm&amp;amp;usg=AFQjCNG6EZPSebSrZgAaEHSrG4DdZz3z7w&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Acronym: Hypertext Preprocessor. PHP is a server-side scripting language for creating dynamic Web pages. You create pages with PHP and HTML. When a visitor opens the page, the server processes the PHP commands and then sends the results to the visitor&#39;s browser, just as with ASP or ColdFusion.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=57&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=QhPeDdtrB9Yw8QzRoy5ZBQ&amp;amp;q=http://net-promoter.com/site-statistics/help/glossary.html&amp;amp;usg=AFQjCNFHzp5mm1dERXWiAjraP-MZaS-gaQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Abbreviation for Hypertext preprocessor&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=58&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=ihWc1_-9XGMgxMSUtIGKgg&amp;amp;q=http://www.beseenwebdesign.com/glossary.html&amp;amp;usg=AFQjCNFrpU-V3UwiQJKajj33XF6JbBf2HQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP, or &quot;PHP: Hypertext Preprocessor&quot;, is a commonly-used open-source scripting language. phpBB is written in PHP and requires the PHP runtime engine to be installed and properly configured on the server phpBB is run on.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=59&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=KKP9Adi1O61heJ5h0KTG4Q&amp;amp;q=http://www.phpbb.com/support/documentation/3.0/glossary/terms.php&amp;amp;usg=AFQjCNFTJmYbVogk9KxSypnXpJ6Msu3C4w&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;One of the most popular server-side scripting languages on the web. PHP is open-source, and noted for its efficiency and suitability for developing web applications.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=60&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=tY0lvPyFR2xyfjHlzTgP4g&amp;amp;q=http://www.aardvarkmedia.co.uk/glossary.html&amp;amp;usg=AFQjCNHwYXcHcHUXFuLrvT0kqREEOnTnlQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=61&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=qfDKC33QNiIJPzBIT3n1ag&amp;amp;q=http://www.acad.bg/beginner/gnrt/appendix/glossary.html&amp;amp;usg=AFQjCNGqA2PReE56MYTlkti90BqNkNBk_Q&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP is the most popular open source programming language for building dynamic web sites which can be used to write server-side programs that access databases.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=62&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=ZA8abTlxw5L2xPZjEsJI8Q&amp;amp;q=http://www.searchenginegenie.com/search-engine-glossary-p.htm&amp;amp;usg=AFQjCNGP4iPxG-vWkfHQKTDVDvy_wu7r6g&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP Hypertext Preprocessor is a server-side embedded scripting language that allows increased delivery of dynamic content from databases. PHP can perform any task that CGI can, but increased compatability with other technologies (SMTP, POP3 etc) makes it much more powerful.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=63&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=EVuB7GY3l7M4eW__HfsH_Q&amp;amp;q=http://www.ambrow.com/glossary.htm&amp;amp;usg=AFQjCNGVhPTFb8sn7xTMGhdShL66ziqaIg&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP (Hypertext Preprocessor) is an free open-source server-side scripting language. PHP code can be embedded in HTML. PHP files usually have extensions like .php or .php3. PHP language style is similar to C and Java.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=64&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=KDUQunWuoLYBhTzAE0IGFQ&amp;amp;q=http://guidex.biz/web_hosting/glossary.html&amp;amp;usg=AFQjCNE8lyI4uu_oqKdGLIG31LkFnej7EA&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Script language on the server (server-side). PHP is converted to (X)HTML code. PHP is widely used for processing data from forms or for communicating with a database&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=65&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=JzLu_YjWCKYKdxrH_jPfcQ&amp;amp;q=http://english.mediadesign.nl/helpdesk/glossary/&amp;amp;usg=AFQjCNG_YMlmFC0Ph1An0-QOKSj8W-rMdQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP is a scripting language used to create dynamic websites. Its advantage over JavaScript is that it runs on the web server rather than on the viewer&#39;s PC or Mac. PHP can be used for the same kind of applications as ASP and .NET but is free and open source.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=66&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=opsKa8wfU0ALJ8_ZKWsXVA&amp;amp;q=http://www.leapinghare.co.uk/help/glossary.html&amp;amp;usg=AFQjCNGi-CI11AthLNK2JVPTVSVTjeMssg&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;A script programming language that can be embedded into HTML. In effect, it turns your HTML pages into a program that is run by the Web server before being displayed, allowing you to customize your site&#39;s Web pages on the fly.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=67&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=l4T0mzDiZveUjaMrDCQC3A&amp;amp;q=http://www.indra.net/support/glossary.html&amp;amp;usg=AFQjCNF4AhWnF-BwBu-txWu-GB0agq5oTQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP(http://www.php.net/) is a server-side, interpreted programming language designed specifically for Web programming. It is closely integrated with Web server technology so does not use the CGI.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=68&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=h9Jov6GXTrH7_KvHS8WzCg&amp;amp;q=http://www.bized.co.uk/educators/16-19/business/marketing/lesson/sup_glossary.htm&amp;amp;usg=AFQjCNHDoAqOoKU2w6oW59JArsEeS6JwTQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;A server-side scripting language made popular by the Open Source community.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=70&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=IJtiLEAuBDTglNZSecDpAA&amp;amp;q=http://www.providerrisk.com/glossary/glossary.htm&amp;amp;usg=AFQjCNGChtwzNHX-8G1UPoS9RQZE69za1Q&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Hypertext Preprocessor : dynamic webpage creation&#39;s technology.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=71&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=PJpaYOXh-yz45IhIzVmKYA&amp;amp;q=http://www.nouky.fr/en.php%3Fp%3Dlexique&amp;amp;usg=AFQjCNESn-3jTGNU7gjPnb9YTwuawWGHIQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Very similar to shtml but utilizes PHP to do its work.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=72&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=-adzvRznEzlc7-cnaXq5qw&amp;amp;q=http://www.saugus.net/Computer/Extensions/Letter/P/&amp;amp;usg=AFQjCNGC-rsn_M5d0x95LZZpdGuvVCwKZg&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Abbreviation for Hypertext Pre-Processor, a server language used to produce dynamic content on web pages.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=73&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=QHdnCIBKAKLGdPNs6nJeew&amp;amp;q=http://avtecmedia.com/tools/web-design-glossary.htm&amp;amp;usg=AFQjCNFP0Ncx8q38Ieo-_ADmsdhr_0x1Og&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Stands for &quot;Hypertext Preprocessor.&quot; A server side scripting language used normally on Unix-based systems.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=74&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=OiLCSJa_To4eq2wzpxqCpA&amp;amp;q=http://www.internetsimplicity.net/glossary.php&amp;amp;usg=AFQjCNEWZ17UtoRIG3S5rSSKGO07i67Rjg&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;Refers to &quot;PHP: Hypertext Preprocessor&quot; which means that PHP handles data before it becomes HTML. According to the official PHP Web site, PHP is a server-side, cross-platform, HTML embedded scripting language.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=75&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=lkHzndVIRcfSh6IDIeoclA&amp;amp;q=http://csguide.auxservices.org/5.1.0.htm&amp;amp;usg=AFQjCNE_eCvXQwKyVeRscba0AJOMlOxbpQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP is a very popular open source server-side scripting language. Like ASP and JSP, PHP code is embedded in web pages and allows the creation of dynamic pages. Most web hosting companies offer PHP.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=76&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=XrTrbctCYi1LOswvUCr_Lg&amp;amp;q=http://www.konoba.com/res_web_glossary.php&amp;amp;usg=AFQjCNGzOrVHuR3rXRpB27uj9YwRedhXCQ&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;li&gt;PHP (PHP:Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic web pages. PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications.&lt;br /&gt;&lt;a href=&quot;http://www.google.com/url?sa=X&amp;amp;start=77&amp;amp;oi=define&amp;amp;ei=h7cYR7CGKJuCtAKM-a2ECg&amp;amp;sig2=8EpzgoD-BIaxal5cmVyPIg&amp;amp;q=http://en.wikipedia.org/wiki/Php&amp;amp;usg=AFQjCNHIZ0cvbBS1_5dd-EhgtyidwbRwNw&quot;&gt;&lt;span style=&quot;color: rgb(0, 128, 0);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/5780554230878858549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/5780554230878858549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/5780554230878858549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/5780554230878858549'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/definitions-of-php_24.html' title='Definitions Of PHP'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-4576055571537301247</id><published>2007-10-20T10:50:00.000+05:30</published><updated>2007-10-25T18:52:04.443+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="database optimization"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql optimization"/><category scheme="http://www.blogger.com/atom/ns#" term="optimize table"/><title type='text'>MySQL Optimization</title><content type='html'>How to Optimize Mysql?&lt;br /&gt;Optimization is a complex task because ultimately it requires understanding of the entire system to be optimized.The most important factor in making a system fast is its basic design.&lt;br /&gt;&lt;br /&gt;The most common system bottlenecks are:&lt;br /&gt;&lt;br /&gt;* Disk seeks. It takes time for the disk to find a piece of data. With modern disks, the mean time for this is usually lower than 10ms, so we can in theory do about 100 seeks a second. This time improves slowly with new disks and is very hard to optimize for a single table. The way to optimize seek time is to distribute the data onto more than one disk.&lt;br /&gt;&lt;br /&gt;* Disk reading and writing. When the disk is at the correct position, we need to read the data. With modern disks, one disk delivers at least 10-20MB/s throughput. This is easier to optimize than seeks because you can read in parallel from multiple disks.&lt;br /&gt;&lt;br /&gt;* CPU cycles. When we have the data in main memory (or if it was already there), we need to process it to get our result. Having small tables compared to the amount of memory is the most common limiting factor. But with small tables, speed is usually not the problem.&lt;br /&gt;&lt;br /&gt;* Memory bandwidth. When the CPU needs more data than can fit in the CPU cache, main memory bandwidth becomes a bottleneck. This is an uncommon bottleneck for most systems, but one to be aware of.&lt;br /&gt;&lt;br /&gt;Optimizing hardware for MySQL&lt;br /&gt;&lt;br /&gt;* If you need big tables ( &gt; 2G), you should consider using 64 bit hardware like Alpha, Sparc or the upcoming IA64. As MySQL uses a lot of 64 bit integers internally, 64 bit CPUs will give much better performance.&lt;br /&gt;&lt;br /&gt;   * For large databases, the optimization order is normally RAM, Fast disks, CPU power.&lt;br /&gt;&lt;br /&gt;   * More RAM can speed up key updates by keeping most of the used key pages in RAM.&lt;br /&gt;&lt;br /&gt;* If you are not using transaction-safe tables or have big disks and want to avoid long file checks, a UPS is good idea to be able to take the system down nicely in case of a power failure.&lt;br /&gt;&lt;br /&gt;* For systems where the database is on a dedicated server, one should look at 1G Ethernet. Latency is as important as throughput.&lt;br /&gt;&lt;br /&gt;Optimizing the application&lt;br /&gt;&lt;br /&gt;   * One should concentrate on solving the problem.&lt;br /&gt;   * When writing the application one should decide what is most important:&lt;br /&gt;         o Speed&lt;br /&gt;         o Portability between OS&lt;br /&gt;         o Portability between SQL servers&lt;br /&gt;   * Use persistent connections.&lt;br /&gt;   * Cache things in your application to lessen the load of the SQL server.&lt;br /&gt;   * Don&#39;t query columns that you don&#39;t need in your application.&lt;br /&gt;   * Don&#39;t use SELECT * FROM table_name...&lt;br /&gt;* Benchmark all parts of your application, but put the most effort into benchmarking the whole application under the worst possible &#39;reasonable&#39; load. By doing this in a modular fashion you should be able to replace the found bottleneck with a fast &#39;dummy module&#39;, you can then easily identify the next bottleneck (and so on).&lt;br /&gt;   * Use LOCK TABLES if you do a lot of changes in a batch; For example group multiple UPDATESDELETES together.&lt;br /&gt;&lt;br /&gt;Optimizing MySQL&lt;br /&gt;&lt;br /&gt;   * Choose compiler and compiler options.&lt;br /&gt;   * Find the best MySQL startup options for your system.&lt;br /&gt;   * Scan the the MySQL manual and read Paul DuBois&#39; MySQL book.&lt;br /&gt;   * Use EXPLAIN SELECT, SHOW VARIABLES, SHOW STATUS and SHOW PROCESSLIST.&lt;br /&gt;   * Learn how the query optimizer works.&lt;br /&gt;   * Optimize your table formats.&lt;br /&gt;   * Maintain your tables (myisamchk, CHECK TABLE, OPTIMIZE TABLE).&lt;br /&gt;   * Use MySQL extensions to get things done faster.&lt;br /&gt;   * Write a MySQL UDF function if you notice that you would need some function in many places.&lt;br /&gt;   * Don&#39;t use GRANT on table level or column level if you don&#39;t really need it.&lt;br /&gt;   * Pay for MySQL support and get help to solve your problem :)</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/4576055571537301247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/4576055571537301247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4576055571537301247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/4576055571537301247'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/mysql-optimization.html' title='MySQL Optimization'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7292930624677787890.post-1263867106597332435</id><published>2007-10-19T19:34:00.000+05:30</published><updated>2007-10-20T14:36:20.825+05:30</updated><title type='text'>Let me Introduce myself</title><content type='html'>I am a PHP Developer. I can do fantastic coding. Now your funnybone might tickle, everyone thinks the same. I have a passion for coding. I can do almost any kind of coding. As such I have worked on some of the most popular CMS . Joomla, phpBB2, oscommerce, etc.... I am member of &lt;a href=&quot;http://www2.drupal.org/user/180161&quot;&gt;Drupal&lt;/a&gt; community also&lt;a href=&quot;http://www2.drupal.org/user/180161&quot;&gt;&lt;span style=&quot;font-size:-1;&quot;&gt;&lt;span class=&quot;a&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;. Ajax is cup of coffee for me. It simplifies some tasks in really amazing manner. I would personally recommend to use all the flavours of PHP on-hand if you are developing in PHP . When I started it was not so easy, as to understand the concepts ,implement them , get the proper output is not everybody&#39;s work. Especially, when there is no other resource. But thanks to WWW who made my work possible. If you get to my blog and find something interesting I will be the most happiest ever.</content><link rel='replies' type='application/atom+xml' href='http://mayurikabhatt.blogspot.com/feeds/1263867106597332435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7292930624677787890/1263867106597332435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/1263867106597332435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7292930624677787890/posts/default/1263867106597332435'/><link rel='alternate' type='text/html' href='http://mayurikabhatt.blogspot.com/2007/10/let-me-introduce-myself.html' title='Let me Introduce myself'/><author><name>Mayurika Bhatt</name><uri>http://www.blogger.com/profile/07871395743075879216</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>