<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkUERn8yeSp7ImA9WhRaFE8.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554</id><updated>2012-02-16T11:23:27.191-08:00</updated><category term="Google Maps" /><category term="Chat" /><category term="Working with time" /><category term="Working with captcha" /><category term="Working with RSS" /><category term="Others" /><category term="Tools" /><category term="Paging" /><category term="Working with Database" /><category term="Working with MySQL" /><category term="Blogs" /><category term="Downloads" /><category term="Security" /><category term="Working with zip" /><category term="Working with images" /><category term="Geography" /><category term="Websites" /><category term="Web Service" /><category term="Working With AJAX" /><category term="Mobile Sites" /><category term="Basic" /><category term="Excel" /><category term="working with files" /><title>Tutorial &amp; Download Free PHP Classes</title><subtitle type="html">Free tutorial and download PHP scripts</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://phpisus.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://phpisus.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>65</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AllAboutPhp" /><feedburner:info uri="allaboutphp" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;D0QAQX8_eCp7ImA9Wx9REkw.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-5780852733680177661</id><published>2010-12-12T20:42:00.000-08:00</published><updated>2010-12-12T20:42:20.140-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-12T20:42:20.140-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with captcha" /><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>DHTML and CSS CAPTCHA</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJ6DUueNBrU/TQWj2xgirbI/AAAAAAAAA7c/feWVsYlwGxo/s1600/snipercaptcha.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="73" src="http://4.bp.blogspot.com/_eJ6DUueNBrU/TQWj2xgirbI/AAAAAAAAA7c/feWVsYlwGxo/s320/snipercaptcha.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;CAPTCHA is the name of an approach used to distinguish site accesses performed by real humans from robot script accesses.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Usually the pages show fuzzy pictures with letters that the user needs to guess. However there are smart anti-CAPTCHA robots that can also guess what is written in CAPTCHA picture.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;This package provides an alternative CAPTCHA solution that consists in using colored boxes that the user must click in order to have access to the protected site resources.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Since this is a new approach, it is harder to break by people that employ common anti-CAPTCHA scripts.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Name: &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;DHTML and CSS CAPTCHA Support forum&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Base name: &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;as_snipercaptcha&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Description: &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;CAPTCHA validation using colored boxes and AJAX&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Version: &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;1.03.007&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Required PHP version: &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;4.3.0&lt;/div&gt;&lt;div style="text-align: justify;"&gt;License: &lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;GNU General Public License (GPL)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Detailed description&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This class can be used to implement CAPTCHA validation using colored boxes that the user must click which are validated using AJAX requests.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;It renders a grid of boxes on which only one box is colored differently to indicate the user must click it.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The class sends an AJAX request to the server passing the coordinates of the user clicks until a given number of clicks correctly point to the colored boxes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="https://sites.google.com/site/avdssite/freedownloads-1/as_snipercaptcha-2008-12-09.zip"&gt;Download here&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-5780852733680177661?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bHDVgwbRlrc4QKJqtgf97DbBgAc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bHDVgwbRlrc4QKJqtgf97DbBgAc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bHDVgwbRlrc4QKJqtgf97DbBgAc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bHDVgwbRlrc4QKJqtgf97DbBgAc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=5780852733680177661" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5780852733680177661?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5780852733680177661?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/eID44vtE0_o/dhtml-and-css-captcha.html" title="DHTML and CSS CAPTCHA" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_eJ6DUueNBrU/TQWj2xgirbI/AAAAAAAAA7c/feWVsYlwGxo/s72-c/snipercaptcha.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2010/12/dhtml-and-css-captcha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMCRng_fip7ImA9Wx5bFkw.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3020086922331443641</id><published>2010-11-01T06:17:00.000-07:00</published><updated>2010-11-01T06:17:47.646-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-01T06:17:47.646-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Websites" /><category scheme="http://www.blogger.com/atom/ns#" term="Mobile Sites" /><title>PHP to Detect Mobile Phones</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJ6DUueNBrU/TM690vaLBVI/AAAAAAAAA58/jkuGViL9jts/s1600/mobile+phones+detection.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/TM690vaLBVI/AAAAAAAAA58/jkuGViL9jts/s200/mobile+phones+detection.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;If you have &amp;nbsp;a website and may want your website to automatically detect the user agents whether it is a mobile or iphone or pc. then you can use the scripts created by Andi Moore. It is a PHP script.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Andy Moore is a &amp;nbsp;dotMobi Certified Mobile Web Developer and you can visit his website at:&amp;nbsp;http://www.andymoore.info/.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The PHP script to detect mobile phones can be reached at&amp;nbsp;http://www.andymoore.info/php-to-detect-mobile-phones/ or you can &lt;a href="https://sites.google.com/site/avdssite/freedownloads-1/php-to-detect-mobile-phones.zip?attredirects=0&amp;amp;d=1"&gt;download here&lt;/a&gt;.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Also you can subscribe to andymore's RSS feed to keep updated of changes to this script at:&lt;br /&gt;
http://andymoore.info/feed/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3020086922331443641?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/js_tseJHRkD2reIzYA_OzINMR_Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/js_tseJHRkD2reIzYA_OzINMR_Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/js_tseJHRkD2reIzYA_OzINMR_Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/js_tseJHRkD2reIzYA_OzINMR_Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3020086922331443641" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3020086922331443641?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3020086922331443641?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/R9xBuIQUfrA/php-to-detect-mobile-phones.html" title="PHP to Detect Mobile Phones" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/TM690vaLBVI/AAAAAAAAA58/jkuGViL9jts/s72-c/mobile+phones+detection.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2010/11/php-to-detect-mobile-phones.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04GQns7eCp7ImA9Wx5TEUk.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-8334075937690058261</id><published>2010-07-26T05:05:00.000-07:00</published><updated>2010-07-26T05:05:23.500-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-26T05:05:23.500-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Basic" /><title>Arrays</title><content type="html">&lt;div class="docText" style="text-align: justify;"&gt;You can create an array using either the &lt;tt&gt;array()&lt;/tt&gt;  function or the array operator [].The &lt;tt&gt;array()&lt;/tt&gt; function is usually used  when you want to create a new array and populate it with more than one element,  all in one fell swoop. The array operator is often used when you want to create  a new array with just one element at the outset, or when you want to add to an  existing array element.&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;&lt;a href="" name="iddle1304"&gt;&lt;/a&gt;&lt;a href="" name="iddle1308"&gt;&lt;/a&gt;&lt;a href="" name="iddle2189"&gt;&lt;/a&gt;The following code snippet shows how to create an array  called &lt;tt&gt;$rainbow&lt;/tt&gt; using the &lt;tt&gt;array()&lt;/tt&gt; function, containing all its  various colors:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;$rainbow = array("red", "orange", "yellow", "green", "blue", "indigo", "violet");&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;The following snippet shows the same array being created  incrementally using the array operator:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;$rainbow[] = "red";&lt;/div&gt;&lt;div style="text-align: justify;"&gt;$rainbow[] = "orange";&lt;/div&gt;$rainbow[] = "yellow";
&lt;div style="text-align: justify;"&gt;rainbow[] = "blue";
$&lt;/div&gt;$rainbow[] = "green";

$rainbow[] = "indigo";
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;$rainbow[] = "violet";&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;Both snippets create a seven-element array called  &lt;tt&gt;$rainbow&lt;/tt&gt;, with values starting at index position 0 and ending at index  position 6. If you wanted to be literal about it, you could have specified the  index positions, such as in this code:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;$rainbow[0] = "red";&lt;/div&gt;&lt;div style="text-align: justify;"&gt;$rainbow[1] = "orange";&lt;/div&gt;$rainbow[2] = "yellow";
&lt;div style="text-align: justify;"&gt;rainbow[4] = "blue";
$&lt;/div&gt;$rainbow[3] = "green";

$rainbow[5] = "indigo";
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;$rainbow[6] = "violet";&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;However, PHP does this for you when positions are not  specified, and that eliminates the possibility that you will misnumber your  elements, as in this example:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;$rainbow[0] = "red";&lt;/div&gt;&lt;div style="text-align: justify;"&gt;$rainbow[1] = "orange";&lt;/div&gt;$rainbow[2] = "yellow";
&lt;div style="text-align: justify;"&gt;rainbow[6] = "blue";
$&lt;/div&gt;$rainbow[5] = "green";

$rainbow[7] = "indigo";
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;$rainbow[8] = "violet";&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;Regardless of whether you initially create your array using the  &lt;tt&gt;array()&lt;/tt&gt; function or the array operator, you can still add to it using  the array operator. In the first line, below, six elements are added to the  array, while one more element is added to the end of the array in the second  line:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;$rainbow = array("red", "orange", "yellow", "green", "blue", "indigo");&lt;/div&gt;&lt;div style="text-align: justify;"&gt;$rainbow[] = "violet";&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;&lt;a href="" name="iddle1305"&gt;&lt;/a&gt;&lt;a href="" name="iddle1313"&gt;&lt;/a&gt;&lt;a href="" name="iddle1323"&gt;&lt;/a&gt;&lt;a href="" name="iddle2964"&gt;&lt;/a&gt;The examples used in this section were  of numerically indexed arrays, arguably the most common type you'll see. In the  next two sections, you learn about two other types of arrays: associative and  multidimensional.&lt;/div&gt;&lt;a href="" name="ch08lev2sec1"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title" id="title-IDAMKJTK" style="text-align: justify;"&gt;Creating Associative Arrays&lt;/h4&gt;&lt;div class="docText" style="text-align: justify;"&gt;Whereas numerically indexed arrays use an index position as the  key0, 1, 2, and so forthassociative arrays utilize actual named keys. The  following example demonstrates this by creating an array called  &lt;tt&gt;$character&lt;/tt&gt; with four elements:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;$character = array(&lt;/div&gt;&lt;div style="text-align: justify;"&gt;            "name" =&amp;gt; "Bob",&lt;/div&gt;&lt;div style="text-align: justify;"&gt;            "occupation" =&amp;gt; "superhero",&lt;/div&gt;"age" =&amp;gt; 30,
&lt;div style="text-align: justify;"&gt;r" =&amp;gt; "x-ray vision"
            );&lt;/div&gt;"special pow
&lt;div style="text-align: justify;"&gt;e&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;The four keys in the &lt;tt&gt;$character&lt;/tt&gt; array are &lt;tt&gt;name,  occupation, age&lt;/tt&gt;, and &lt;tt&gt;special power&lt;/tt&gt;. The associated values are  &lt;tt&gt;Bob, superhero, 30&lt;/tt&gt;, and &lt;tt&gt;x-ray vision&lt;/tt&gt;, respectively. You can  reference specific elements of an associative array using the specific key, such  as in this example:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;echo $character['occupation'];&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;The output of this snippet would be:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;superhero&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;As with numerically indexed arrays, you can use the array  operator to add to an associative array:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;$character['supername'] = "Mega X-Ray Guy";&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;This example adds a key called &lt;tt&gt;supername&lt;/tt&gt; with a value  of &lt;tt&gt;Mega X-Ray Guy&lt;/tt&gt;.&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;The only difference between an associative array and a  numerically indexed array is the key name; in a numerically indexed array, the  key name is a number; in an associative array, the key name is a meaningful  word.&lt;/div&gt;&lt;a href="" name="ch08lev2sec2"&gt;&lt;/a&gt; &lt;h4 class="docSection2Title" id="title-IDAVMJTK" style="text-align: justify;"&gt;Creating Multidimensional  Arrays&lt;/h4&gt;&lt;div class="docText" style="text-align: justify;"&gt;The first two types of arrays hold strings and integers,  whereas this third type holds other arrays. If each set of key/value pairs  constitutes a dimension, a multidimensional array holds more than one series of  these key/value pairs. For example, &lt;a class="docLink" href="http://draft.blogger.com/post-create.g?blogID=4814516188663218554"&gt;&lt;i&gt;l&lt;/i&gt;&lt;/a&gt;&lt;i&gt;isting below,&lt;/i&gt; defines a multidimensional array called &lt;tt&gt;$characters&lt;/tt&gt;, each  element of which contains an associative array. This may sound confusing, but  it's really only an array that contains another array.&lt;/div&gt;&lt;div class="docText"&gt;&lt;/div&gt;&lt;a href="" name="ch08list01"&gt;&lt;/a&gt; &lt;h5 class="docExampleTitle" id="title-IDAONJTK" style="text-align: justify;"&gt;Listing. Defining a  Multidimensional Array&lt;/h5&gt;&lt;br /&gt;
&lt;table border="1" cellpadding="5" cellspacing="0" style="text-align: justify;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;pre&gt;1:  "Bob",
5:                    "occupation" =&amp;gt; "superhero",
6:                    "age" =&amp;gt; 30,
7:                    "special power" =&amp;gt; "x-ray vision"
8:                   ),
9:                  array(
10:                   "name" =&amp;gt; "Sally",
11:                   "occupation" =&amp;gt; "superhero",
12:                   "age" =&amp;gt; 24,
13:                   "special power" =&amp;gt; "superhuman strength"
14:                  ),
15:                  array(
16:                   "name" =&amp;gt; "Jane",
17:                   "occupation" =&amp;gt; "arch villain",
18:                   "age" =&amp;gt; 45,
19:                   "special power" =&amp;gt; "nanotechnology"
20:                  )
21:               );
22: ?&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div class="docText" style="text-align: justify;"&gt;In line 2, the &lt;tt&gt;$characters&lt;/tt&gt; array is initialized using  the &lt;tt&gt;array()&lt;/tt&gt; function. Lines 38 represent the first element, lines 914  represent the second element, and lines 1520 represent the third element. These  elements can be referenced as &lt;tt&gt;$characters[0], $characters[1]&lt;/tt&gt;, and  &lt;tt&gt;$characters[2]&lt;/tt&gt;.&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;Each element consists of an associative array, itself  containing four elements: &lt;tt&gt;name, occupation, age&lt;/tt&gt;, and  &lt;tt&gt;special_power&lt;/tt&gt;.&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;However, if you attempt to print the master elements like  so:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;echo $characters[1];&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;the output will be this:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;Array&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;because the master element indeed holds an array as its  content. To really get to the content you want, that is, the specific  information found within the inner array element, you need to access the master  element index position plus the associative name of the value you want to  view.&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;Take a look at this example:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;echo $characters[1]['occupation'];&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;It will print this:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre style="text-align: justify;"&gt;superhero&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;If you add the following lines to the end of the code in &lt;a class="docLink" href="http://draft.blogger.com/post-create.g?blogID=4814516188663218554"&gt;&lt;i&gt;l&lt;/i&gt;&lt;/a&gt;&lt;i&gt;isting above&lt;/i&gt;, it prints the information  stored in each element:&lt;/div&gt;&lt;div class="docText"&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;foreach ($characters as $c) {&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       while (list($k, $v) = each ($c)) {&lt;/div&gt;echo "$k ... $v 
";
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;}
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;The &lt;tt&gt;foreach&lt;/tt&gt; loop is concerned with the master array  element, &lt;tt&gt;$characters&lt;/tt&gt;. It loops through this array and assigns the  temporary name &lt;tt&gt;$c&lt;/tt&gt; to the element contained within each position. Next,  we begin a &lt;tt&gt;while&lt;/tt&gt; loop. This loop uses two functions to extract the  contents of the inner array. First, the &lt;tt&gt;list()&lt;/tt&gt; function names  placeholder variables, &lt;tt&gt;$k&lt;/tt&gt; and &lt;tt&gt;$v&lt;/tt&gt;, which will be populated with  the keys and values gathered from the &lt;tt&gt;each()&lt;/tt&gt; function. The  &lt;tt&gt;each()&lt;/tt&gt; function looks at each element of the &lt;tt&gt;$c&lt;/tt&gt; array and  extracts the information accordingly.&lt;/div&gt;&lt;div class="docText" style="text-align: justify;"&gt;The &lt;tt&gt;echo&lt;/tt&gt; statement simply prints each key and value  (&lt;tt&gt;$k&lt;/tt&gt; and &lt;tt&gt;$v&lt;/tt&gt;) extracted from the &lt;tt&gt;$c&lt;/tt&gt; array using the  &lt;tt&gt;each()&lt;/tt&gt; function and adds a line break for display purposes. Figure&lt;i&gt;&amp;nbsp;below&lt;/i&gt;, shows the result of this file,  called &lt;tt&gt;mdarray.php&lt;/tt&gt;.&lt;/div&gt;&lt;a href="" name="ch08fig01"&gt;&lt;/a&gt;  &lt;br /&gt;
&lt;center&gt; &lt;h5 class="docFigureTitle" style="text-align: justify;"&gt;Figure. Looping through a multidimensional  array.&lt;/h5&gt;&lt;div class="docText"&gt; &lt;/div&gt;&lt;div class="v1" style="text-align: justify;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJ6DUueNBrU/TE15VbYLSUI/AAAAAAAAA24/W0pivOT324M/s1600/array.JPG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/TE15VbYLSUI/AAAAAAAAA24/W0pivOT324M/s320/array.JPG" width="290" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="v1" style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/center&gt; &lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-8334075937690058261?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UUilmOcvejhPyo3UFQPcWrKJnj0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UUilmOcvejhPyo3UFQPcWrKJnj0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UUilmOcvejhPyo3UFQPcWrKJnj0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UUilmOcvejhPyo3UFQPcWrKJnj0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=8334075937690058261" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/8334075937690058261?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/8334075937690058261?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/kz1I3G4cuRE/arrays.html" title="Arrays" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/TE15VbYLSUI/AAAAAAAAA24/W0pivOT324M/s72-c/array.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2010/07/arrays.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMGQXw7eip7ImA9WxBWE0g.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-6139741302698219280</id><published>2010-02-04T22:13:00.000-08:00</published><updated>2010-02-04T22:13:40.202-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-04T22:13:40.202-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Geography" /><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps" /><title>Google Maps Api</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_eJ6DUueNBrU/S2u2rfkWkgI/AAAAAAAAAxc/HAJsPGrKNYw/s1600-h/google+api+thumnail.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/S2u2rfkWkgI/AAAAAAAAAxc/HAJsPGrKNYw/s320/google+api+thumnail.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;This class has been made by Sven Weih from Germany and can be used to present world maps using Google Maps API in other sites.&lt;br /&gt;
&lt;br /&gt;
It allows defining several details of the maps to be displayed like: markers pointing to given addresses, dragable markers, location points, several types of controls, the zoom level, map center coordinates, width and height of the map in the page.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_eJ6DUueNBrU/S2u2mc4VSWI/AAAAAAAAAxU/Lh5eAFP0fFY/s1600-h/google+api.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_eJ6DUueNBrU/S2u2mc4VSWI/AAAAAAAAAxU/Lh5eAFP0fFY/s320/google+api.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
License: GNU General Public License (GPL)&lt;br /&gt;
&lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/nxgooglemapsapi-2006-09-12.zip"&gt;Download all files here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-6139741302698219280?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/627jPmC8QgCitmnt5-hQlUpRpoM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/627jPmC8QgCitmnt5-hQlUpRpoM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/627jPmC8QgCitmnt5-hQlUpRpoM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/627jPmC8QgCitmnt5-hQlUpRpoM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=6139741302698219280" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/6139741302698219280?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/6139741302698219280?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/VDrGsxO5jEU/google-maps-api.html" title="Google Maps Api" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/S2u2rfkWkgI/AAAAAAAAAxc/HAJsPGrKNYw/s72-c/google+api+thumnail.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2010/02/google-maps-api.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUDRHc5fyp7ImA9WxBRGEk.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3765111613120108132</id><published>2010-01-06T23:11:00.000-08:00</published><updated>2010-01-06T23:11:15.927-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-06T23:11:15.927-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="working with files" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel" /><title>Excel Stream</title><content type="html">&lt;div style="text-align: justify;"&gt;Xlsstream is a stream wrapper to read and write MS Excel files&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This class has been made by Ignatius Teo, from australia. &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This class implements a stream handler interface to read and write Microsoft Excel spreadsheet files in the XLS format.&lt;br /&gt;
&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;XLS files may be read and written using PHP fopen, fread or fwrite, or any other PHP functions that can access to streams.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The file name has the format xlsfile://path/to/spreadsheet.xls where /path/to/spreadsheet.xls is the path of the actual spreadsheet file to be read or written.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;To create a XLS file just pass a serialized array of spreadsheet row arrays that associate the column names with their values.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In the current version the class does not process the data read from a XLS file. Instead it just returns the raw XLS file data as is.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This class requires at least PHP 4.3.0 as that is the version when stream handling support was introduced in PHP.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Required PHP version:  4.3&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;License:  BSD License&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/xlsstream-2005-01-20.zip"&gt;download here&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3765111613120108132?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I6Y-XyhEQAzdhuS7dBBdk5QacN8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I6Y-XyhEQAzdhuS7dBBdk5QacN8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I6Y-XyhEQAzdhuS7dBBdk5QacN8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I6Y-XyhEQAzdhuS7dBBdk5QacN8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3765111613120108132" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3765111613120108132?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3765111613120108132?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/DKSMT-ng3jI/excel-stream.html" title="Excel Stream" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2010/01/excel-stream.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAAR3o9cCp7ImA9WxNaFU0.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-9003174979451600138</id><published>2009-11-25T00:01:00.000-08:00</published><updated>2009-11-29T06:09:06.468-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-29T06:09:06.468-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tools" /><category scheme="http://www.blogger.com/atom/ns#" term="Geography" /><title>Easy Google Map</title><content type="html">&lt;div style="text-align: justify;"&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/_eJ6DUueNBrU/SwzlS8oksrI/AAAAAAAAAlM/G0aAUVbSqT0/s1600/easy+google+map.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_eJ6DUueNBrU/SwzlS8oksrI/AAAAAAAAAlM/G0aAUVbSqT0/s200/easy+google+map.JPG" /&gt;&lt;/a&gt;&lt;a href="http://phpisus.blogspot.com/2009/11/easy-google-map.html"&gt;EasyGoogleMap&lt;/a&gt; is a php-class-package which has a functionality to display world locations using Google maps. This package has been made by &lt;a href="http://ordinarywebguy.wordpress.com/"&gt;Mitchelle Pascua&lt;/a&gt;l, a blogger from Philippines.&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This class can generate the necessary HTML and Javascript to create a map display on a web page with optinal locations be marked with special icons.&lt;br /&gt;
&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;More features are that:&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- it can define the map width, height, and zoom level&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- Add one or more marker to locations on the map using their addresses&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- Use several types of predefined icons and colors to mark locations&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;- Define the information window text and link URLs associated to a location&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Requirements:&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;PHP version 4.3&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Licence: GNU-GPL&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/easygooglemap-2007-04-25.zip"&gt;download here 6 kb&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-9003174979451600138?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qYb_aPFdDc37X8sB9UgXe_ZSCy0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qYb_aPFdDc37X8sB9UgXe_ZSCy0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qYb_aPFdDc37X8sB9UgXe_ZSCy0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qYb_aPFdDc37X8sB9UgXe_ZSCy0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=9003174979451600138" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/9003174979451600138?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/9003174979451600138?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/qXQpP9f7UOY/easy-google-map.html" title="Easy Google Map" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_eJ6DUueNBrU/SwzlS8oksrI/AAAAAAAAAlM/G0aAUVbSqT0/s72-c/easy+google+map.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/11/easy-google-map.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8FRX0zfyp7ImA9WxNaFU0.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-1838121070149966277</id><published>2009-11-19T01:21:00.000-08:00</published><updated>2009-11-29T06:10:14.387-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-29T06:10:14.387-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Blogs" /><title>Blog Integration</title><content type="html">&lt;div style="text-align: justify;"&gt;&lt;a href="http://phpisus.blogspot.com/2009/11/blog-integration.html"&gt;BloggerIntegration&lt;/a&gt; has functionality to import a blog from &lt;a href="http://blogger.com/"&gt;blogger.com&lt;/a&gt; to another site.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The classes in this package can process one or more blogs parsing the blog to extract posts, comments, images, etc.&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The processed blogs pages can be rendered and published into another site with a different template. This package can also integrate imported blogs with a site published with osCommerce.&lt;br /&gt;
&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;Name: Blogger Integration Support forum &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Base name: &lt;a href="http://phpisus.blogspot.com/2009/11/blog-integration.html"&gt;bloggerintegration &lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Description: Import a blog published in Blogger.com into a site &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Version: 1.3 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Required PHP version: 4.3 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;License: GNU General Public License (GPL)&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;The package includes:&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;readme.html &lt;span style="white-space: pre;"&gt;    &lt;/span&gt;Doc. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;Documentation 31,435 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;licence.txt &lt;span style="white-space: pre;"&gt;    &lt;/span&gt;Lic. &lt;span style="white-space: pre;"&gt;   &lt;/span&gt;GNU General Public License 18,326  &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;frame.php &lt;span style="white-space: pre;"&gt;    &lt;/span&gt;Appl. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;main file 1,702&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;BloggerIntegration.php4 &lt;span style="white-space: pre;"&gt; &lt;/span&gt;Class &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;PHP4 class file 7,271 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;DynamicTemplate.php4 &lt;span style="white-space: pre;"&gt; &lt;/span&gt;Class &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;PHP4 class file 4,129 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;BloggerIntegration.php5 &lt;span style="white-space: pre;"&gt; &lt;/span&gt;Class &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;PHP5 class file 7,149 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;DynamicTemplate.php5 &lt;span style="white-space: pre;"&gt; &lt;/span&gt;Class &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;PHP5 class file 4,541 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;template.php &lt;span style="white-space: pre;"&gt;   &lt;/span&gt;Aux. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;osCommerce template example 2,350 &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;application_top.php &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;Appl. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;osCommerce application_top 22,703  &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;languages.php &lt;span style="white-space: pre;"&gt;   &lt;/span&gt;Appl. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;osCommerce language box 1,549  &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;currencies.php &lt;span style="white-space: pre;"&gt;   &lt;/span&gt;Appl. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;osCommerce currencies box 1,984&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;html_output.php &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;Appl. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;osCommerce HTML output functions 11,191  &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;information.php &lt;span style="white-space: pre;"&gt;   &lt;/span&gt;Appl. &lt;span style="white-space: pre;"&gt;  &lt;/span&gt;osCommerce information box 1,686  &lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Download all files: &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/bloggerintegration-2007-03-23.zip"&gt;bloggerintegration-2007-03-23.zip&lt;/a&gt; (94915 bytes) &lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-1838121070149966277?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/beuRoMcoVo8hKapJ4dr8Vhu8VbY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/beuRoMcoVo8hKapJ4dr8Vhu8VbY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/beuRoMcoVo8hKapJ4dr8Vhu8VbY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/beuRoMcoVo8hKapJ4dr8Vhu8VbY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=1838121070149966277" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/1838121070149966277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/1838121070149966277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/fihrT9bd2fg/blog-integration.html" title="Blog Integration" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/11/blog-integration.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQFSHY-fip7ImA9WxNXF04.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3997565710538308103</id><published>2009-10-04T03:55:00.000-07:00</published><updated>2009-10-05T03:08:39.856-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-05T03:08:39.856-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web Service" /><title>Api-Google-Translate</title><content type="html">&lt;div style="text-align: justify;"&gt;api-google-translate is a class that can be used to translate text using the Google Translate API. This class is written by Jamie Telin from Sweden.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;It sends an HTTP request to Google Translate API Web server passing the text to be translated and the original and target languages pair.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The class decode the JSON response returned by the server and returns the translated text.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Version: 1.1 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Required PHP version: 4.1 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;License: &lt;a href="http://www.opensource.org/licenses/lgpl-license.html"&gt;GNU Lesser General Public License (LGPL)&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This class can be downloaded either from phpclass/org or &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/api-google-translate-2009-10-04.zip"&gt;here (2kb)&lt;/a&gt;. The package is including the codes of countries&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3997565710538308103?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2y7zioymzTbck17zNcaLn6JVGNg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2y7zioymzTbck17zNcaLn6JVGNg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2y7zioymzTbck17zNcaLn6JVGNg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2y7zioymzTbck17zNcaLn6JVGNg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3997565710538308103" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3997565710538308103?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3997565710538308103?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/qVkdATVTwA0/api-google-translate.html" title="Api-Google-Translate" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/10/api-google-translate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8NR3gzfyp7ImA9WxNaFU0.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-9128559602406518292</id><published>2009-08-28T04:28:00.000-07:00</published><updated>2009-11-29T06:11:36.687-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-29T06:11:36.687-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Basic" /><title>Using the static Statement to Remember the Value of a Variable Between Function Calls</title><content type="html">&lt;a href="http://1.bp.blogspot.com/_eJ6DUueNBrU/SpfAGEubXHI/AAAAAAAAAdI/jfcv4nnXyWk/s1600-h/numbered2.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5374975890870197362" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/SpfAGEubXHI/AAAAAAAAAdI/jfcv4nnXyWk/s200/numbered2.jpg" style="float: left; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;If you declare a variable within a function in conjunction with the static statement, the variable remains local to the function, and the function "remembers" the value of the variable from execution to execution&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;&amp;lt;?php&lt;br /&gt;
function numberedHeading($txt) {&lt;br /&gt;
static $num_of_calls = 0;&lt;br /&gt;
$num_of_calls++;&lt;br /&gt;
echo "&amp;lt;h1&amp;gt;".$num_of_calls." ". $txt."&amp;lt;/h1&amp;gt;"; }&lt;br /&gt;
numberedHeading("Mobile Phones");&lt;br /&gt;
echo "&amp;lt;p&amp;gt;We build a fine range of mobile phones.&amp;lt;/p&amp;gt;";&lt;br /&gt;
numberedHeading("Camera");&lt;br /&gt;
echo "&amp;lt;p&amp;gt;Also Digital Cameras..&amp;lt;/p&amp;gt;";&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;The numberedHeading() function has become entirely self-contained. When we declare the $num_of_calls variable on line 3, we assign an initial value to it. This assignment is made when the function is first called on line 7. This initial assignment is ignored when the function is called a second time on line 9. Instead, the code remembers the previous value of $num_of_calls. We can now paste the numberedHeading() function into other scripts without worrying about global variables.&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-9128559602406518292?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-ZsDjar7z-vKuYX4-Apv4uAmgLg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-ZsDjar7z-vKuYX4-Apv4uAmgLg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-ZsDjar7z-vKuYX4-Apv4uAmgLg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-ZsDjar7z-vKuYX4-Apv4uAmgLg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=9128559602406518292" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/9128559602406518292?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/9128559602406518292?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/0Zm7BVTVKNs/using-static-statement-to-remember.html" title="Using the static Statement to Remember the Value of a Variable Between Function Calls" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/SpfAGEubXHI/AAAAAAAAAdI/jfcv4nnXyWk/s72-c/numbered2.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/08/using-static-statement-to-remember.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcARH45eyp7ImA9WxNbGUU.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3408860040504181350</id><published>2009-08-20T08:35:00.000-07:00</published><updated>2009-11-23T05:47:25.023-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-23T05:47:25.023-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Basic" /><title>Saving State Between Function Calls with the static Statement</title><content type="html">&lt;div style="text-align: justify;"&gt;Local variables within functions have a short but happy life they come into being when the function is called and die when execution is finished, as they should. Occasionally, however, you may want to give a function a rudimentary memory.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Let's assume that we want a function to keep track of the number of times it has been called so that numbered headings can be created by a script. We could, of course, use the global statement to do this, as shown in Listing below:&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;&amp;lt;?php&lt;/div&gt;&lt;div style="text-align: justify;"&gt;$num_of_calls = 0;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;function numberedHeading($txt) {&lt;/div&gt;&lt;div style="text-align: justify;"&gt;global $num_of_calls;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;$num_of_calls++;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;echo "&amp;lt;h1&amp;gt;".$num_of_calls." ".$txt."&amp;lt;/h1&amp;gt;";&lt;/div&gt;&lt;div style="text-align: justify;"&gt;} &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"   style="  white-space: pre-wrap; font-family:-webkit-monospace;font-size:13px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;numberedHeading("Mobile Phones");&lt;/div&gt;&lt;div style="text-align: justify;"&gt;echo "&amp;lt;p&amp;gt;We build a fine range of mobile phones.&amp;lt;/p&amp;gt;";&lt;/div&gt;&lt;div style="text-align: justify;"&gt;numberedHeading("Camera");&lt;/div&gt;&lt;div style="text-align: justify;"&gt;echo "&amp;lt;p&amp;gt;Also Digital Cameras.&amp;lt;/p&amp;gt;";&lt;/div&gt;&lt;div style="text-align: justify;"&gt;?&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_eJ6DUueNBrU/Spe6GkExA-I/AAAAAAAAAdA/jo3wkRi2JKY/s1600-h/numbered.jpg"&gt;&lt;img style="float:left; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 156px;" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/Spe6GkExA-I/AAAAAAAAAdA/jo3wkRi2JKY/s200/numbered.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5374969302215623650" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3408860040504181350?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-JteiZhqnfQRBLeLv0L2qbJFglY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-JteiZhqnfQRBLeLv0L2qbJFglY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-JteiZhqnfQRBLeLv0L2qbJFglY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-JteiZhqnfQRBLeLv0L2qbJFglY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3408860040504181350" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3408860040504181350?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3408860040504181350?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/qUE8OO9t1XI/saving-state-between-function-calls.html" title="Saving State Between Function Calls with the static Statement" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/Spe6GkExA-I/AAAAAAAAAdA/jo3wkRi2JKY/s72-c/numbered.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/08/saving-state-between-function-calls.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcDQH8yfyp7ImA9WxNaFU0.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-6374541840846018574</id><published>2009-08-06T04:53:00.000-07:00</published><updated>2009-11-29T06:14:31.197-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-29T06:14:31.197-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with images" /><title>Cropping Image On The Fly</title><content type="html">Here is php script for cropping image on the fly:&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #000099;"&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
// set width, height, source file, file type, destination file&lt;br /&gt;
&lt;br /&gt;
function cropImage($nw, $nh, $source, $stype, $dest) {&lt;br /&gt;
&lt;br /&gt;
$size = getimagesize($source); // get size&lt;br /&gt;
&lt;br /&gt;
$w = $size[0];&lt;br /&gt;
&lt;br /&gt;
$h = $size[1];&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
switch($stype) { // image format&lt;br /&gt;
&lt;br /&gt;
case 'gif':&lt;br /&gt;
&lt;br /&gt;
$simg = imagecreatefromgif($source);&lt;br /&gt;
&lt;br /&gt;
break;&lt;br /&gt;
&lt;br /&gt;
case 'jpg':&lt;br /&gt;
&lt;br /&gt;
$simg = imagecreatefromjpeg($source);&lt;br /&gt;
&lt;br /&gt;
break;&lt;br /&gt;
&lt;br /&gt;
case 'png':&lt;br /&gt;
&lt;br /&gt;
$simg = imagecreatefrompng($source);&lt;br /&gt;
&lt;br /&gt;
break;&lt;br /&gt;
&lt;br /&gt;
}&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #000099;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="color: #000099;"&gt;&lt;br /&gt;
$dimg = imagecreatetruecolor($nw, $nh); // create new image&lt;br /&gt;
&lt;br /&gt;
$wm = $w/$nw;&lt;br /&gt;
&lt;br /&gt;
$hm = $h/$nh;&lt;br /&gt;
&lt;br /&gt;
$h_height = $nh/2;&lt;br /&gt;
&lt;br /&gt;
$w_height = $nw/2;&lt;br /&gt;
&lt;br /&gt;
if($w&amp;gt; $h) {&lt;br /&gt;
&lt;br /&gt;
$adjusted_width = $w / $hm;&lt;br /&gt;
&lt;br /&gt;
$half_width = $adjusted_width / 2;&lt;br /&gt;
&lt;br /&gt;
$int_width = $half_width - $w_height;&lt;br /&gt;
&lt;br /&gt;
imagecopyresampled($dimg,$simg,-$int_width,0,0,0,$adjusted_width,$nh,$w,$h);&lt;br /&gt;
&lt;br /&gt;
} elseif(($w &amp;lt;$h) || ($w == $h)) {&lt;br /&gt;
&lt;br /&gt;
$adjusted_height = $h / $wm;&lt;br /&gt;
&lt;br /&gt;
$half_height = $adjusted_height / 2;&lt;br /&gt;
&lt;br /&gt;
$int_height = $half_height - $h_height;&lt;br /&gt;
&lt;br /&gt;
imagecopyresampled($dimg,$simg,0,-$int_height,0,0,$nw,$adjusted_height,$w,$h);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
imagecopyresampled($dimg,$simg,0,0,0,0,$nw,$nh,$w,$h);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
imagejpeg($dimg,$dest,100);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$image_ori = "image_ori.jpg";&lt;br /&gt;
&lt;br /&gt;
$image_crop = "image_crop.jpg";&lt;br /&gt;
&lt;br /&gt;
// run crop function&lt;br /&gt;
&lt;br /&gt;
// width, height, image_ori, image format, image_crop&lt;br /&gt;
&lt;br /&gt;
cropImage(225, 165, "$image_ori", 'jpg', "$image_crop");&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print "&amp;lt;h2&amp;gt;Image before crop : &amp;lt;br&amp;gt; &amp;lt;img src=$image_ori&amp;gt; &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";&lt;br /&gt;
&lt;br /&gt;
print "Image after crop : &amp;lt;br&amp;gt; &amp;lt;img src=$image_crop&amp;gt;";&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_eJ6DUueNBrU/SnrFkqzeEOI/AAAAAAAAAcw/g2W7KeDFoO0/s1600-h/crop.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5366819139721498850" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/SnrFkqzeEOI/AAAAAAAAAcw/g2W7KeDFoO0/s320/crop.jpg" style="cursor: hand; cursor: pointer; float: left; height: 320px; margin: 0 0 10px 10px; width: 317px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-6374541840846018574?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/13BIKJu5nDS5-EQfEOWSLrQpal8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/13BIKJu5nDS5-EQfEOWSLrQpal8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/13BIKJu5nDS5-EQfEOWSLrQpal8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/13BIKJu5nDS5-EQfEOWSLrQpal8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=6374541840846018574" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/6374541840846018574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/6374541840846018574?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/eCO-2FauTm0/cropping-image-on-fly.html" title="Cropping Image On The Fly" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/SnrFkqzeEOI/AAAAAAAAAcw/g2W7KeDFoO0/s72-c/crop.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/08/cropping-image-on-fly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUASXc6fSp7ImA9WxNaFU0.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-6875665233553525087</id><published>2009-06-28T06:59:00.000-07:00</published><updated>2009-11-29T06:17:28.915-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-29T06:17:28.915-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web Service" /><category scheme="http://www.blogger.com/atom/ns#" term="Chat" /><title>Yahoo Status Checker</title><content type="html">&lt;div style="text-align: justify;"&gt;This class is made by &lt;a href="http://davoodjafari.ir/"&gt;Davood Jafari&lt;/a&gt; and can be used to check the online status of a Yahoo messenger user.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;It can access the Yahoo online services Web server and send a request to retrieve the  online status of a given Yahoo messenger user.&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;The package can be downloaded &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/yahoo-status-checker-2009-06-18.zip"&gt;here (1 kb)&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;Inside the package are:&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;Check.Class.php &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;--  &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Class Class Core&lt;/div&gt;&lt;div style="text-align: justify;"&gt;index.php &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;--&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Example Sample File&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;License: &lt;a href="http://www.opensource.org/licenses/gpl-license.html" target="_blank"&gt;GNU General Public License (GPL)&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-6875665233553525087?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/F311PnGK3ctCO9pjbbZRAw_01Xo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F311PnGK3ctCO9pjbbZRAw_01Xo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/F311PnGK3ctCO9pjbbZRAw_01Xo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/F311PnGK3ctCO9pjbbZRAw_01Xo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=6875665233553525087" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/6875665233553525087?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/6875665233553525087?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/JIB7cibViS8/yahoo-status-checker.html" title="Yahoo Status Checker" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/06/yahoo-status-checker.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUERnc4eip7ImA9WxNaFU0.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-2125452173035348156</id><published>2009-06-22T07:43:00.000-07:00</published><updated>2009-11-29T06:16:47.932-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-29T06:16:47.932-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with Database" /><title>Database Servers Down Alarm</title><content type="html">&lt;div&gt;&lt;div style="text-align: justify;"&gt;This class is made by &lt;b&gt;Alexander Selifonov&lt;/b&gt; and &lt;b&gt; &lt;span class="Apple-style-span" style="font-weight: normal; "&gt;can be used to send alarm messages when databases are down. &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;It can check one or more database servers by connecting to them to see if they are up or down.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;&lt;div style="text-align: justify;"&gt;The class can send an alert e-mail or SMS message to the systems administrators when a database server is down. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;When the database server is up, another alert message is sent.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Currently it supports checking multiple types database servers: MySQL, Mini-SQL, Microsoft SQL Server, IBM DB2, Oracle, PostgreSQL, etc..&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can download the packeage from &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/as_dbserver_check-2009-06-19.zip"&gt;here (12 kb !!)&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In the package are:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;as_dbserver_check.php &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Class main class module&lt;/div&gt;&lt;div style="text-align: justify;"&gt;checkdb.php Example &lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;using sample&lt;/div&gt;&lt;div style="text-align: justify;"&gt;as_dbserver_check.en.htm Doc.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Documentation (english)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;as_dbserver_check.ru.htm Doc. &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Documentation (russian)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;License: &lt;a href="http://www.opensource.org/licenses/bsd-license.html" target="_blank"&gt;BSD License&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-2125452173035348156?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KQGg7BQmtGeXhWdWjkh4frIFT0o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KQGg7BQmtGeXhWdWjkh4frIFT0o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KQGg7BQmtGeXhWdWjkh4frIFT0o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KQGg7BQmtGeXhWdWjkh4frIFT0o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=2125452173035348156" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/2125452173035348156?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/2125452173035348156?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/_ZF2iY3k85g/database-servers-down-alarm.html" title="Database Servers Down Alarm" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/06/database-servers-down-alarm.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEDRXc9fSp7ImA9WxJWEEg.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-5890024093149328785</id><published>2009-06-15T00:55:00.000-07:00</published><updated>2009-06-15T00:57:54.965-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-15T00:57:54.965-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="working with files" /><title>Safe Upload</title><content type="html">&lt;div class="framed light"&gt;This class is made by Ahmed Selim Refaat Ahmed and can be used to process files uploaded via  Web forms.&lt;/div&gt;&lt;div class="framed light"&gt;&lt;br /&gt;It checks a given uploaded file and performs several checks  before processing it like: checking the file name against a black list of banned  names, check if the file already exists in a target directory, check whether the  file size is not zero nor exceeds and given limit, check the MIME type against a  list of accepted types, check the file name extension against a list of accepted  extensions.&lt;br /&gt;&lt;br /&gt;Then the class processes the file by moving it to a target  directory. If it succeeds, the class returns an array with several details about  the file.&lt;/div&gt;&lt;div class="framed light"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="framed light"&gt;The package can be downloaded &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/safe_upload-2009-05-25.zip"&gt;here (3 kb)&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-5890024093149328785?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/03q_2PZ_UjDhUPLYtfX61FpVugM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/03q_2PZ_UjDhUPLYtfX61FpVugM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/03q_2PZ_UjDhUPLYtfX61FpVugM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/03q_2PZ_UjDhUPLYtfX61FpVugM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=5890024093149328785" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5890024093149328785?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5890024093149328785?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/55VOVoEW7Wg/safe-upload.html" title="Safe Upload" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/06/safe-upload.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IGRnY_eCp7ImA9WxJXE0g.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3489827725070735046</id><published>2009-06-07T00:19:00.000-07:00</published><updated>2009-06-07T00:25:27.840-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-07T00:25:27.840-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with RSS" /><title>Auto RSS</title><content type="html">This class has been developed by Roberto Aleman and can be used to generate a RSS feed from files pf a  directory.&lt;br /&gt;&lt;br /&gt;It can read the list of files available in a given server  directory and generates an RSS 2.0 feed with the list of files.&lt;br /&gt;&lt;br /&gt;The base  URL for the files and other details are configurable options.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download it &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/autorss-2009-06-06.rar"&gt;here (131kb)&lt;/a&gt; or from phpclasses.org. The package is containing:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;index.php &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Example index.php &lt;/div&gt;&lt;div&gt;autorss.php &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;Class class file, engine rss channel &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3489827725070735046?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2FLmoxjiv898ZPyLN0jRNeZlvAY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2FLmoxjiv898ZPyLN0jRNeZlvAY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2FLmoxjiv898ZPyLN0jRNeZlvAY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2FLmoxjiv898ZPyLN0jRNeZlvAY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3489827725070735046" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3489827725070735046?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3489827725070735046?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/2-UlzEud7Ig/auto-rss.html" title="Auto RSS" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/06/auto-rss.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUEQng5fSp7ImA9WxJQF0s.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-690487239616436469</id><published>2009-05-31T03:00:00.000-07:00</published><updated>2009-05-31T03:03:23.625-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-31T03:03:23.625-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with captcha" /><title>Friendly Captcha</title><content type="html">&lt;div&gt;This package can be used to implement CAPTCHA validation using text with math expression.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a base class that can display a text message to tell the user what he needs to input.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A math subclass generates an expression with a random math operation between two number values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The user must enter the result of the operation to pass the CAPTCHA validation. The correct answer is stored in session variables for posterior validation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All files are written by  Chris Hepner.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download it &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/friendlycaptcha-2009-05-29.zip"&gt;here (19kb)&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-690487239616436469?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ajle9wZr7MlV09tuP5PVDigrz3Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ajle9wZr7MlV09tuP5PVDigrz3Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ajle9wZr7MlV09tuP5PVDigrz3Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ajle9wZr7MlV09tuP5PVDigrz3Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=690487239616436469" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/690487239616436469?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/690487239616436469?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/Vs5pSLYzWiA/friendly-captcha.html" title="Friendly Captcha" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/05/friendly-captcha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8GRngycCp7ImA9WxJREk8.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-7685817672160478146</id><published>2009-05-13T07:07:00.000-07:00</published><updated>2009-05-13T07:10:27.698-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-13T07:10:27.698-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working With AJAX" /><title>AJAX Based Chat</title><content type="html">&lt;div style="text-align: justify;"&gt;This class can be used to implement a simple Web based chat system that uses AJAX to update the chat dialog display area without reloading the whole page.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The class generates a page with a Web form to submit what each chat line that the users type.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The chat lines are sent to the server using a XMLHttpRequest object.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The chat lines are received by a server side script that uses the class to store what each user entered in a MySQL database table.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In response, the class outputs the chat list already formatted to by displayed in the user browser pages.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;chat.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Class&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;The Main Class&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;2,662&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; chat.sql&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Data&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;The SQL code&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;527&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; refresh.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Aux.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Retrieve data from class&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;189&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; submit.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Aux.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Submits data to the class&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;201&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; index.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Example&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Example file&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;69&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can download those files from phpclasses.org or from:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Download all files:&lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/ajax-chat-2006-10-06.zip"&gt; ajax-chat-2006-10-06.zip (104380 bytes)&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-7685817672160478146?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fGd8drHeDtfnmV3d5LsDTITj7D8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fGd8drHeDtfnmV3d5LsDTITj7D8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fGd8drHeDtfnmV3d5LsDTITj7D8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fGd8drHeDtfnmV3d5LsDTITj7D8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=7685817672160478146" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/7685817672160478146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/7685817672160478146?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/-IsMQwPDdCY/ajax-based-chat.html" title="AJAX Based Chat" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/05/ajax-based-chat.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UNQnw9fip7ImA9WxNQF00.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3498305370927382674</id><published>2009-05-11T07:14:00.000-07:00</published><updated>2009-09-23T04:28:13.266-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T04:28:13.266-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="working with files" /><title>Import and export data in databases to XML files</title><content type="html">&lt;div&gt;This class is meant to import and export data stored in SQL databases to XML files using the ADODB library.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It provides a function to export the data of SQL query result set to XML file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It also provides another function that parses XML files that define the data of fields to be inserted as new rows of a table also specified in the XML files.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download these files (the class and the examples) from phpclass.org or &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/adodb_xml-2004-07-23.zip"&gt;here (8kb)&lt;/a&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Included in the package are:&lt;/div&gt;&lt;div&gt;&lt;div&gt;class.ADODB_XML.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Class&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Class mother&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; class.xml.php    --    Class    --&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Auxiliary class&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; connection.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  Aux.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  connection for ADOdb&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; DB_TO_XML.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  Example&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  This example saves the data of the consultation in an file XML&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; user.sql&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; --  Data  -- &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Script SQL&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; usersxml.xml&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  Data  -- &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;XML for test&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; XML_TO_DB.php&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  Example&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;--  This example saves the content of file XML in the table "users" of the Data base&lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3498305370927382674?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZPfMhj0EL3BrALfqJxCV5P3j53I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZPfMhj0EL3BrALfqJxCV5P3j53I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZPfMhj0EL3BrALfqJxCV5P3j53I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZPfMhj0EL3BrALfqJxCV5P3j53I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3498305370927382674" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3498305370927382674?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3498305370927382674?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/b6dST7tPIbI/import-and-export-data-in-databases-to.html" title="Import and export data in databases to XML files" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/05/import-and-export-data-in-databases-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4GQHs6eip7ImA9WxJSFUU.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-3778296880645522404</id><published>2009-05-05T22:29:00.000-07:00</published><updated>2009-05-05T22:32:01.512-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-05T22:32:01.512-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with MySQL" /><title>Optimize All Tables In A MySQL Database</title><content type="html">&lt;div&gt;If you have a database driven site and you want to optimize MySQL tables then this is perfect. It goes through all the tables in a MySQL database and does table optimization on each one using the MySQL Optimize Table syntax.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;?php &lt;/div&gt;&lt;div&gt;dbConnect() &lt;/div&gt;&lt;div&gt;$alltables = mysql_query("SHOW TABLES"); &lt;/div&gt;&lt;div&gt;while ($table = mysql_fetch_assoc($alltables)) &lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;   foreach ($table as $db =&amp;gt; $tablename) &lt;/div&gt;&lt;div&gt;   { &lt;/div&gt;&lt;div&gt;       mysql_query("OPTIMIZE TABLE '".$tablename."'") &lt;/div&gt;&lt;div&gt;           or die(mysql_error()); &lt;/div&gt;&lt;div&gt;   }     &lt;/div&gt;&lt;div&gt;} &lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-3778296880645522404?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PPpx-em8uSL5M4DN7yssgPnmKXU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PPpx-em8uSL5M4DN7yssgPnmKXU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PPpx-em8uSL5M4DN7yssgPnmKXU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PPpx-em8uSL5M4DN7yssgPnmKXU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=3778296880645522404" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3778296880645522404?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/3778296880645522404?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/UTc9D8fjogg/optimize-all-tables-in-mysql-database.html" title="Optimize All Tables In A MySQL Database" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/05/optimize-all-tables-in-mysql-database.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkINQnc8fip7ImA9WxJTFEQ.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-1245113254723714302</id><published>2009-04-23T06:46:00.000-07:00</published><updated>2009-04-23T06:49:53.976-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-23T06:49:53.976-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="Paging" /><title>Sam Pagination</title><content type="html">&lt;div&gt;This class is supplied by Olowoyo Samuel and can be used to display database query results split in multiple pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It can perform queries to a MySQL database table and retrieve a range of results to display in the current page given the page number and the limit of results to display per page.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The class can display the results as a listing of articles or as photo gallery.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download it &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/sampaginator-2008-05-20.zip"&gt;here (303kb including examples)&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-1245113254723714302?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mSgmRJq3x7Wd3plKDAJ8_uDK42o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mSgmRJq3x7Wd3plKDAJ8_uDK42o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mSgmRJq3x7Wd3plKDAJ8_uDK42o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mSgmRJq3x7Wd3plKDAJ8_uDK42o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=1245113254723714302" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/1245113254723714302?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/1245113254723714302?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/hc-TB4CVe3M/sam-pagination.html" title="Sam Pagination" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/04/sam-pagination.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAAQ3o8cSp7ImA9WxNQF00.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-5095037971148296819</id><published>2009-04-22T06:04:00.000-07:00</published><updated>2009-09-23T04:52:22.479-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T04:52:22.479-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with MySQL" /><category scheme="http://www.blogger.com/atom/ns#" term="working with files" /><title>WebSite Backup + Database mySQL Backup</title><content type="html">These classes are made by ThoR® aka Kender functioning to back up files and MySQL database. You can download it&lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/websitebackup-2004-07-10.tar.gz"&gt; here (6kb)&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Below are the instructions of use and sample of how to use it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;INSTRUCTIONS&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/********************************&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;BACKUP OF FILES&lt;/div&gt;&lt;div&gt;*********************************/&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;= new BackUp;&lt;/div&gt;&lt;div&gt;this initialize the class&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;WhatBackup(PATH_TO_SAVE);&lt;/div&gt;&lt;div&gt;this set which folder will be compressed&lt;/div&gt;&lt;div&gt;Relative path. Full path should work. No final "/"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;WhereBackup(MOVE_COMPRESSED_FOLDER_HERE);&lt;/div&gt;&lt;div&gt;this set in which folder the compressed archive will be saved&lt;/div&gt;&lt;div&gt;Relative path. Full path should work. No final "/"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;FileName(NAME_OF_ARCHIVE);&lt;/div&gt;&lt;div&gt;this set the name to give to archive&lt;/div&gt;&lt;div&gt;you can create name on-the-fly, using date(); or whatever you want&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;Debug();&lt;/div&gt;&lt;div&gt;if you want to display all the infos about compression&lt;/div&gt;&lt;div&gt;This will display all vars set before: What Backup, Where, and name of archive&lt;/div&gt;&lt;div&gt;Nothing more...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/********************************&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;BACKUP OF DATABASE&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div&gt;*********************************/&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;= new BackUp;&lt;/div&gt;&lt;div&gt;this initialize the class&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;DBFileName(NAME_OF_SQL_FILE);&lt;/div&gt;&lt;div&gt;this set the name of file of SQL Dump, and save it directly to server&lt;/div&gt;&lt;div&gt;Relative path. Full path should work.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;SaveAs(NAME_OF_SQL_FILE);&lt;/div&gt;&lt;div&gt;this set the name of file of SQL Dump, and ask to "save as..." to save it on own disk...&lt;/div&gt;&lt;div&gt;if this is set, the "DBFileName" function of the class, is ignored&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;$mkBackup-&gt;DBMakeBackup("server","port","user","password","database_name");&lt;/div&gt;&lt;div&gt;this create the backup. Vars are very simple:&lt;/div&gt;&lt;div&gt;server is the mySQL server (if empty, "localhost" is used)&lt;/div&gt;&lt;div&gt;port is the port of mySQL server (if empty, "3306" is used)&lt;/div&gt;&lt;div&gt;user is the user used to connect to mySQL server (if empty, "root" is used)&lt;/div&gt;&lt;div&gt;password is the password used to connect to mySQL server (if empty, empty password is used)&lt;/div&gt;&lt;div&gt;database_name is the name of the Database to save (if empty, it will display an error)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/********************************&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;BACKUP EXAMPLE&lt;/div&gt;&lt;div&gt;*********************************/&lt;/div&gt;&lt;div&gt;Backup files:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$mkBackup&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;= new BackUp;&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;WhatBackup("www/mysite");&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;WhereBackup("www/backup");&lt;/div&gt;&lt;div&gt;$filename&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;= date("Y_m_d__H_i_s___WebSiteBackup");&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;FileName($filename);&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;Backup();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Database Backup, directly on server:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$mkBackup&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;= new BackUp;&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;DBFileName("www/backup/2004_05_18__TestingBK.sql");&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;DBMakeBackup("localhost","","root","","my_database");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Database Backup, save as...:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$mkBackup&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;= new BackUp;&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;SaveAs("2004_05_18__TestingBK.sql");&lt;/div&gt;&lt;div&gt;$mkBackup-&gt;DBMakeBackup("localhost","","root","","my_database");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-5095037971148296819?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bzu3Heq6lGokQRxliCwibjR0pSg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bzu3Heq6lGokQRxliCwibjR0pSg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bzu3Heq6lGokQRxliCwibjR0pSg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bzu3Heq6lGokQRxliCwibjR0pSg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=5095037971148296819" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5095037971148296819?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5095037971148296819?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/BqWaKbsLTvU/website-backup-database-mysql-backup.html" title="WebSite Backup + Database mySQL Backup" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/04/website-backup-database-mysql-backup.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMHR3Y8fip7ImA9WxVaF0Q.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-4642609100520282911</id><published>2009-04-15T04:17:00.000-07:00</published><updated>2009-04-15T04:20:36.876-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-15T04:20:36.876-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with images" /><title>Batch Image Manipulation</title><content type="html">&lt;div&gt;This is an OO class developed by scott to handle batch image manipulation, &lt;/div&gt;&lt;div&gt;like making thumbnails of all images in a directory -- or stamping &lt;/div&gt;&lt;div&gt;text onto all images in a directory. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;BatchImageManip v1.0 supports only "text stamping" and thumbnail creation. &lt;/div&gt;&lt;div&gt;More features are planned, like resizing all images to a maximum aspect, etc. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For some idea of what this class can do, please check out some of the sample images. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can downlo0ad the class &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/batch_image_manip.tgz"&gt;here (4kb)&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-4642609100520282911?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tOm1CY0PigHpMkYv5GBr6nxbDAw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tOm1CY0PigHpMkYv5GBr6nxbDAw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tOm1CY0PigHpMkYv5GBr6nxbDAw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tOm1CY0PigHpMkYv5GBr6nxbDAw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=4642609100520282911" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/4642609100520282911?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/4642609100520282911?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/xKIPGX_90II/batch-image-manipulation.html" title="Batch Image Manipulation" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/04/batch-image-manipulation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcBR3s7fyp7ImA9WxNbGUU.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-5622188812958460125</id><published>2009-04-14T02:44:00.000-07:00</published><updated>2009-11-23T05:47:36.507-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-23T05:47:36.507-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Basic" /><title>Accessing Variables with the global Statement</title><content type="html">&lt;div&gt;From within one function, you cannot (by default) access a variable defined in another function or elsewhere in the script. Within a function, if you attempt to use a variable with the same name, you will only set or access a local variable. Let's put this to the test :&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;lt;?php&lt;/div&gt;&lt;div&gt;$life = 42;&lt;/div&gt;&lt;div&gt;function meaningOfLife() {&lt;/div&gt;&lt;div&gt;echo "The meaning of life is ".$life;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;meaningOfLife();&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;div&gt;Put these lines into a text file called scopetest2.php and place this file in your web server document root. When you access this script through your web browser, it should look like:&lt;/div&gt;&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_eJ6DUueNBrU/SeRbSbBJFwI/AAAAAAAAAZw/9K2CWNeW0LM/s1600-h/scopetest2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 280px;" src="http://1.bp.blogspot.com/_eJ6DUueNBrU/SeRbSbBJFwI/AAAAAAAAAZw/9K2CWNeW0LM/s320/scopetest2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5324481031507089154" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;As you might expect, the meaningOfLife() function does not have access to the $life variable in line 2; $life is empty when the function attempts to print it. On the whole, this is a good thing because it saves us from potential clashes between identically named variables, and a function can always demand an argument if it needs information about the outside world. Occasionally, you may want to access an important variable from within a function without passing it in as an argument. This is where the global statement comes into play. Use global to restore order to the universe.&lt;/div&gt;&lt;div&gt;&amp;lt;?php&lt;/div&gt;&lt;div&gt;$life=42;&lt;/div&gt;&lt;div&gt;function meaningOfLife() {&lt;/div&gt;&lt;div&gt;global $life;&lt;/div&gt;&lt;div&gt;echo "The meaning of life is ".$life;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;meaningOfLife();&lt;/div&gt;&lt;div&gt;?&amp;gt;&lt;/div&gt;&lt;div&gt;Put these lines into a text file called scopetest3.php and place this file in your web server document root. When you access this script through your web browser, it should look like:&lt;/div&gt;&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_eJ6DUueNBrU/SeRbqfn7MPI/AAAAAAAAAZ4/wRVtHb3u3Ro/s1600-h/scopetest3.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 280px;" src="http://3.bp.blogspot.com/_eJ6DUueNBrU/SeRbqfn7MPI/AAAAAAAAAZ4/wRVtHb3u3Ro/s320/scopetest3.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5324481445060358386" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;By placing the global statement in front of the $life variable when we declare it in the meaningOfLife() function (line 4), it now refers to the $life variable declared outside the function (line 2).&lt;/div&gt;&lt;div&gt;You will need to use the global statement within every function that needs to access a particular named global variable. Be careful, though; if you manipulate the contents of the variable within the function, the value of the variable will be changed for the script as a whole.&lt;/div&gt;&lt;div&gt;You can declare more than one variable at a time with the global statement by simply separating each of the variables you want to access with commas:&lt;/div&gt;&lt;div&gt;global $var1, $var2, $var3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Watch Out!&lt;/div&gt;&lt;div&gt;Usually, an argument is a copy of whatever value is passed by the calling code; changing it in a function has no effect beyond the function block. Changing a global variable within a function, on the other hand, changes the original and not a copy. Use the global statement carefully.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-5622188812958460125?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7SkFzrnO_LDUfAFY1HohVZGcnEY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7SkFzrnO_LDUfAFY1HohVZGcnEY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7SkFzrnO_LDUfAFY1HohVZGcnEY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7SkFzrnO_LDUfAFY1HohVZGcnEY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=5622188812958460125" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5622188812958460125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/5622188812958460125?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/fbhlu3I0eTo/accessing-variables-with-global.html" title="Accessing Variables with the global Statement" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_eJ6DUueNBrU/SeRbSbBJFwI/AAAAAAAAAZw/9K2CWNeW0LM/s72-c/scopetest2.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/04/accessing-variables-with-global.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcCRHk8cSp7ImA9WxNbGUU.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-8460636380975270752</id><published>2009-04-14T02:25:00.000-07:00</published><updated>2009-11-23T05:47:45.779-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-23T05:47:45.779-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Basic" /><title>Variable Scope</title><content type="html">&lt;div&gt;A variable declared within a function remains local to that function. In other words, it will not be available outside the function or within other functions. In larger projects, this can save you from accidentally overwriting the contents of a variable when you declare two variables with the same name in separate functions.&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Create a variable within a function and then attempts to print it outside the function:&lt;/div&gt;&lt;div&gt;&amp;lt;?php&lt;/div&gt;&lt;div&gt; function test() {&lt;/div&gt;&lt;div&gt;      $testvariable = "this is a test variable";&lt;/div&gt;&lt;div&gt; }&lt;/div&gt;&lt;div&gt; echo "test variable: ".$testvariable."&amp;lt;br/&amp;gt;";&lt;/div&gt;&lt;div&gt; ?&amp;gt;&lt;/div&gt;&lt;div&gt;Put these lines into a text file called scopetest.php and place this file in your web server document root. When you access this script through your web browser, it should look like &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_eJ6DUueNBrU/SeRW4gjtsvI/AAAAAAAAAZo/fOqkzJkV9Yw/s1600-h/scoptest.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 281px;" src="http://2.bp.blogspot.com/_eJ6DUueNBrU/SeRW4gjtsvI/AAAAAAAAAZo/fOqkzJkV9Yw/s320/scoptest.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5324476188271162098" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;By the Way&lt;/div&gt;&lt;div&gt;The exact output you see depends on your PHP error settings. That is, it may or may not produce a "notice" as shown, but it will show the lack of an additional string after "test variable".&lt;/div&gt;&lt;div&gt;The value of the variable $testvariable is not printed because no such variable exists outside the test() function. Remember that the attempt in line 5 to access a nonexistent variable produces a notice such as the one displayed only if your PHP settings are set to display all errors, notices, and warnings; if your error settings are not strictly set, only the string "test variable" will be shown.&lt;/div&gt;&lt;div&gt;Similarly, a variable declared outside a function will not automatically be available within it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-8460636380975270752?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wND7ffh2slMJfkN017FYqb8JOyo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wND7ffh2slMJfkN017FYqb8JOyo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wND7ffh2slMJfkN017FYqb8JOyo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wND7ffh2slMJfkN017FYqb8JOyo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=8460636380975270752" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/8460636380975270752?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/8460636380975270752?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/tAZ5wD2QBM8/variable-scope.html" title="Variable Scope" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_eJ6DUueNBrU/SeRW4gjtsvI/AAAAAAAAAZo/fOqkzJkV9Yw/s72-c/scoptest.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/04/variable-scope.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8HQHg9eip7ImA9WxVaEUQ.&quot;"><id>tag:blogger.com,1999:blog-4814516188663218554.post-1060780171029638954</id><published>2009-04-08T06:15:00.000-07:00</published><updated>2009-04-08T06:20:31.662-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T06:20:31.662-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Working with time" /><title>DateClass and DateSpanClass</title><content type="html">This file, dateclass.php, consists of two classes, namely, DateClass and DateSpanClass.&lt;div&gt;&lt;br /&gt;&lt;div&gt;DateClass allows you to add a period to a date. You can also retrieve periods such as begin/end of month, begin/end of week, and begin/end of quarters.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;DateSpanClass allows you to determine the span between two dates. The span can be a wide variety of different kinds of periods including year, month, week, weekdays, &amp;amp; quarters.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These classes are written by Steve Powell and can be downloaded from phpclasses.org oe from &lt;a href="http://sites.google.com/site/avdssite/freedownloads-1/dateclass-2004-05-25.tar"&gt;here (60 kb)&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4814516188663218554-1060780171029638954?l=phpisus.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5JJ9h_CI-RvAkNlHrG2DaLB7ILU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5JJ9h_CI-RvAkNlHrG2DaLB7ILU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5JJ9h_CI-RvAkNlHrG2DaLB7ILU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5JJ9h_CI-RvAkNlHrG2DaLB7ILU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4814516188663218554&amp;postID=1060780171029638954" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/1060780171029638954?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4814516188663218554/posts/default/1060780171029638954?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AllAboutPhp/~3/dQrEDd2gfR4/dateclass-and-datespanclass.html" title="DateClass and DateSpanClass" /><author><name>Albert V. Dian Sano</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://bp3.blogger.com/_eJ6DUueNBrU/SA4bM48oL3I/AAAAAAAAACw/m3S0gn_HARI/S220/me.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://phpisus.blogspot.com/2009/04/dateclass-and-datespanclass.html</feedburner:origLink></entry></feed>

