<?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" gd:etag="W/&quot;C0UHQXwycSp7ImA9WhRWFEk.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750</id><updated>2012-01-01T23:37:10.299+05:30</updated><category term="ajax simple code javascript" /><category term="get current page url in php" /><category term="list files" /><category term="javascript" /><category term="Customer feedback" /><category term="php" /><category term="php Encryption" /><category term="Link Submition" /><category term="Finding all url links in a page" /><category term="codeigniter" /><category term="Thumbnail script" /><category term="remote ftp" /><category term="Detect Alphabet only string" /><category term="blog" /><category term="flex" /><category term="validation" /><category term="list of files in a directory" /><category term="image resize" /><category term="redirect page" /><category term="Decryption" /><category term="find url of page" /><category term="rss" /><category term="file upload" /><category term="cakephp" /><category term="Add New MySQL User" /><category term="Calculating Price Ranges" /><category term="php url links" /><category term="php file exists or not" /><category term="Jquery" /><category term="AppStore Ranking" /><category term="PDF to MS Word" /><category term="Regular Expression" /><category term="Google Currency Converter" /><category term="reader" /><title>Tutorials php javascript ajax css html</title><subtitle type="html">Tutorials Code samples  Php Flex Javascript Ajax CSS  Html.
Updated regularly.Visit and subscribe to the rss feed.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>46</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/blogspot/IwpX" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="blogspot/iwpx" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0UHQX05eCp7ImA9WhRWFEk.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-768300381849764915</id><published>2012-01-01T23:37:00.000+05:30</published><updated>2012-01-01T23:37:10.320+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-01T23:37:10.320+05:30</app:edited><title>How to make Dojo parse the html elements on page on load ?</title><content type="html">Dojo can parse the elements in the html and convert to Dojo or Dijit elements.&lt;br /&gt;
&lt;br /&gt;
Include&amp;nbsp;
&lt;span style="background-color: white; color: blue; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 15px; text-align: left; white-space: pre;"&gt;parseOnLoad&lt;/span&gt;&amp;nbsp;config parameter&amp;nbsp;after the script include tag.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="line number1 index0 alt2" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #222222; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="htmlscript plain" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&amp;lt;&lt;/code&gt;&lt;code class="htmlscript keyword" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;script&lt;/code&gt; &lt;code class="htmlscript color1" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: gray !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;src&lt;/code&gt;&lt;code class="htmlscript plain" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;=&lt;/code&gt;&lt;code class="htmlscript string" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: blue !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;"&lt;a href="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: blue !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; text-decoration: none; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js&lt;/a&gt;"&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #222222; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="htmlscript spaces" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="htmlscript color1" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: gray !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;djConfig&lt;/code&gt;&lt;code class="htmlscript plain" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;=&lt;/code&gt;&lt;code class="htmlscript string" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: blue !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;"parseOnLoad:true"&lt;/code&gt;&lt;code class="jscript plain" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: black !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&amp;gt;&lt;/code&gt;&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: #222222; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;For some reasons if this is not worked try the below js code after dojo include&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;tag.&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;
&lt;code class="htmlscript plain" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&amp;lt;&lt;/code&gt;&lt;code class="htmlscript keyword" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(0, 102, 153) !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; font-weight: bold !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;script type="text/javascript"&amp;gt;&lt;/code&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;dojo.config.parseOnLoad=true;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;b&gt;&lt;span style="color: #0b5394;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="background-attachment: initial !important; background-clip: initial !important; background-color: white; background-image: initial !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; height: auto !important; left: auto !important; line-height: 15px; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0.1em !important; padding-left: 1em !important; padding-right: 1em !important; padding-top: 0.1em !important; position: static !important; right: auto !important; text-align: left; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important; zoom: 1;"&gt;
&lt;code class="jscript script" style="background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-width: 0px !important; bottom: auto !important; box-sizing: content-box !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; overflow-x: visible !important; overflow-y: visible !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-768300381849764915?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/768300381849764915/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=768300381849764915" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/768300381849764915?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/768300381849764915?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2012/01/how-to-make-dojo-parse-html-elements-on.html" title="How to make Dojo parse the html elements on page on load ?" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkcHSXk4fSp7ImA9Wx5TE0w.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-5658002599922500625</id><published>2010-07-28T15:10:00.001+05:30</published><updated>2010-07-28T15:10:38.735+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-28T15:10:38.735+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cakephp" /><title>php- Cakephp how to load helper in a component</title><content type="html">Helpers can be loaded in to components and use as class objects&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function index() {&lt;br /&gt;        App::import('Helper', 'Html'); // loadHelper('Html'); in CakePHP 1.1.x.x&lt;br /&gt;        $html = new HtmlHelper();&lt;br /&gt;        debug($html-&gt;link('Cake!', 'http://cakephp.org'));&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-5658002599922500625?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/5658002599922500625/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=5658002599922500625" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5658002599922500625?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5658002599922500625?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/07/php-cakephp-how-to-load-helper-in.html" title="php- Cakephp how to load helper in a component" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEEEQH09cCp7ImA9WxFaEUQ.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-1926917390390509046</id><published>2010-07-15T16:46:00.001+05:30</published><updated>2010-07-15T16:46:41.368+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-15T16:46:41.368+05:30</app:edited><title>Php - creating table of values with fixed column from an array of values</title><content type="html">Easily create tables &lt;br /&gt;&lt;br /&gt;Use array_chunk($arrvalues, 2);&lt;br /&gt;&lt;br /&gt;Array&lt;br /&gt;(&lt;br /&gt;    [0] =&gt; Array&lt;br /&gt;        (&lt;br /&gt;            [0] =&gt; a&lt;br /&gt;            [1] =&gt; b&lt;br /&gt;        )&lt;br /&gt;&lt;br /&gt;    [1] =&gt; Array&lt;br /&gt;        (&lt;br /&gt;            [0] =&gt; c&lt;br /&gt;            [1] =&gt; d&lt;br /&gt;        )&lt;br /&gt;&lt;br /&gt;    [2] =&gt; Array&lt;br /&gt;        (&lt;br /&gt;            [0] =&gt; e&lt;br /&gt;        )&lt;br /&gt;&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://www.php.net/manual/en/function.array-chunk.php&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-1926917390390509046?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/1926917390390509046/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=1926917390390509046" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/1926917390390509046?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/1926917390390509046?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/07/php-creating-table-of-values-with-fixed.html" title="Php - creating table of values with fixed column from an array of values" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DU8NRH08fip7ImA9WxFVFk0.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-8442762108787856963</id><published>2010-06-14T17:10:00.002+05:30</published><updated>2010-06-15T18:48:15.376+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-15T18:48:15.376+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cakephp" /><title>Cakephp - Adding meta data to a website</title><content type="html">meta(string $type, string $url = null, array $attributes = array(), boolean $inline = true)&lt;br /&gt;
&lt;br /&gt;
This method is handy for linking to external resources like RSS/Atom feeds and favicons. Like css(), you can specify whether or not you'd like this tag to appear inline or in the head tag using the fourth parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$html-&gt;meta(&lt;br /&gt;
'favicon.ico',&lt;br /&gt;
'/favicon.ico',&lt;br /&gt;
array('type' =&amp;gt; 'icon')&lt;br /&gt;
);?&amp;gt; //Output (line breaks added) &lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;link href="http://example.com/favicon.ico" rel="alternate" title="favicon.ico" type="image/x-icon"&gt;&lt;/link&gt;&lt;br /&gt;
&lt;br /&gt;
$html-&gt;meta(&lt;br /&gt;
'Comments',&lt;br /&gt;
'/comments/index.rss',&lt;br /&gt;
array('type' =&amp;gt; 'rss'));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//Output (line breaks added)&lt;br /&gt;
&lt;link href="http://example.com/comments/index.rss" rel="alternate" title="Comments" type="application/rss+xml"&gt;&lt;/link&gt;&lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-8442762108787856963?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/8442762108787856963/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=8442762108787856963" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/8442762108787856963?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/8442762108787856963?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/06/cakephp-adding-meta-data-to-website.html" title="Cakephp - Adding meta data to a website" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkIDSXo-cCp7ImA9WxFVEEs.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-6427014212710705523</id><published>2010-06-09T12:59:00.001+05:30</published><updated>2010-06-09T12:59:38.458+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-09T12:59:38.458+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="validation" /><category scheme="http://www.blogger.com/atom/ns#" term="Jquery" /><title>Jquery : Attaching an event to multiple elements at one go</title><content type="html">var a = $("#a");&lt;br /&gt;var b = $("#b");&lt;br /&gt;var combined = a.add(b);&lt;br /&gt;&lt;br /&gt;Now u can use &lt;br /&gt;&lt;br /&gt;combined.click(function () { /* */ });&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;this can be used in situation where u want to add same validation to two different forms&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-6427014212710705523?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/6427014212710705523/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=6427014212710705523" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6427014212710705523?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6427014212710705523?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/06/jquery-attaching-event-to-multiple.html" title="Jquery : Attaching an event to multiple elements at one go" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8CQ389eCp7ImA9WxFQF0g.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-6327836098685225845</id><published>2010-05-13T17:09:00.001+05:30</published><updated>2010-05-13T17:11:02.160+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-13T17:11:02.160+05:30</app:edited><title>Create a Simple Image Slide Show using jQuery</title><content type="html">&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;&lt;!&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;DOCTYPE &lt;/span&gt;&lt;span style="color: red;"&gt;html PUBLIC &lt;/span&gt;&lt;span style="color: blue;"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"
&lt;br /&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;html &lt;/span&gt;&lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.w3.org/1999/xhtml"&gt;
&lt;br /&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;head&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;   &lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;&lt;/span&gt;Simple Slide Show with jQuery&lt;span style="color: blue;"&gt;&lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;   &lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;script &lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;='text/javascript'
&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'&gt;
&lt;br /&gt;   &lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;   &lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;script &lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&gt;
&lt;br /&gt;       var &lt;/span&gt;imgs = [
&lt;br /&gt;       &lt;span style="color: rgb(163, 21, 21);"&gt;'images/emo.jpg'&lt;/span&gt;,
&lt;br /&gt;       &lt;span style="color: rgb(163, 21, 21);"&gt;'images/icon068.gif'&lt;/span&gt;,
&lt;br /&gt;       &lt;span style="color: rgb(163, 21, 21);"&gt;'images/icon260.jpg'&lt;/span&gt;];
&lt;br /&gt;       &lt;span style="color: blue;"&gt;var &lt;/span&gt;cnt = imgs.length;
&lt;br /&gt;
&lt;br /&gt;       $(&lt;span style="color: blue;"&gt;function&lt;/span&gt;() {
&lt;br /&gt;           setInterval(Slider, 3000);
&lt;br /&gt;       });
&lt;br /&gt;
&lt;br /&gt;       &lt;span style="color: blue;"&gt;function &lt;/span&gt;Slider() {
&lt;br /&gt;       $(&lt;span style="color: rgb(163, 21, 21);"&gt;'#imageSlide'&lt;/span&gt;).fadeOut(&lt;span style="color: rgb(163, 21, 21);"&gt;"slow"&lt;/span&gt;, &lt;span style="color: blue;"&gt;function&lt;/span&gt;() {
&lt;br /&gt;          $(&lt;span style="color: blue;"&gt;this&lt;/span&gt;).attr(&lt;span style="color: rgb(163, 21, 21);"&gt;'src'&lt;/span&gt;, imgs[(imgs.length++) % cnt]).fadeIn(&lt;span style="color: rgb(163, 21, 21);"&gt;"slow"&lt;/span&gt;);
&lt;br /&gt;       });
&lt;br /&gt;       }
&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;&lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;head&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;   &lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;img &lt;/span&gt;&lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="imageSlide" &lt;/span&gt;&lt;span style="color: red;"&gt;alt&lt;/span&gt;&lt;span style="color: blue;"&gt;="" &lt;/span&gt;&lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="" /&gt;
&lt;br /&gt;&lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;body&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;
&lt;br /&gt;&lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;html&lt;/span&gt;&lt;span style="color: blue;"&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-6327836098685225845?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/6327836098685225845/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=6327836098685225845" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6327836098685225845?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6327836098685225845?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/05/create-simple-image-slide-show-using.html" title="Create a Simple Image Slide Show using jQuery" /><author><name>JESSIN</name><uri>http://www.blogger.com/profile/02463056153195270334</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://2.bp.blogspot.com/_dTuw2X-fvvo/S-QFOMfHQsI/AAAAAAAAAAM/ZRQ7V3lhuXk/s1600-R/27370_100001054885673_7798_q.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkECR3o6fSp7ImA9WxFQF04.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-6325156764692094295</id><published>2010-05-13T13:43:00.002+05:30</published><updated>2010-05-13T13:47:46.415+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-13T13:47:46.415+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="file upload" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>Php- File upload limit changing using htaccess/php.ini</title><content type="html">&lt;span style="font-size: large;"&gt;FASTCGI &amp;nbsp;/ APACHE - &lt;/span&gt;&lt;span style="font-size: large;"&gt;Changing &lt;/span&gt;&lt;span style="font-size: large;"&gt;PHP File upload limit&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
Php default maximum upload limit is 8 MB. You can change the default settings by changing the server settings using .htaccess file or custom php5.ini file in the case of godaddy hosting.&amp;nbsp; &amp;nbsp; &lt;br /&gt;
First thing you have to find out is what your server API is?&lt;br /&gt;
print out php info of your hosted server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the &amp;nbsp;Server API value.&lt;br /&gt;
&lt;b&gt;If &amp;nbsp;the  Server API is apache You can do the following&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1)&lt;/b&gt; Create a .htaccess file in the root folder of web server.&lt;br /&gt;
&lt;b&gt;2)&lt;/b&gt; Put the following code in side the .htaccess file and save it.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="background-color: #eeeeee;"&gt;php_value upload_max_filesize 20M&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;php_value post_max_size 20M&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;php_value max_execution_time 200&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;php_value max_input_time 200&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&amp;nbsp;This will work in godaddy hosting.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;If your Server API is CGI/FASTCGI do the follwing .&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
create a php5.ini file and write in it&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;upload_max_filesize = 100M &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;post_max_size = 100M &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;output_buffering = on &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;max_execution_time = 1000 &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;max_input_time = 1000 &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #eeeeee;"&gt;memory_limit = 64M&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
And upload it to your websites root folder.&lt;br /&gt;
Check the phpinfo and you can see the changes if it worked.Do not forget to put the file name php5.ini.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-6325156764692094295?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/6325156764692094295/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=6325156764692094295" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6325156764692094295?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6325156764692094295?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/05/php-file-upload-limit-changing-using.html" title="Php- File upload limit changing using htaccess/php.ini" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEIGRXs9eCp7ImA9WxFQEU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-5043246645600460559</id><published>2010-05-06T10:38:00.001+05:30</published><updated>2010-05-06T10:38:44.560+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-06T10:38:44.560+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="image resize" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="codeigniter" /><title>Php-codeigniter creating thumbnails</title><content type="html">I have created a library function &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function image_resize($data)&lt;br /&gt;	{&lt;br /&gt;			$this-&gt;CI =&amp; get_instance();&lt;br /&gt;			$error="";&lt;br /&gt;			$config['image_library'] = 'gd2';&lt;br /&gt;			$config['source_image'] = $data['source_image'];&lt;br /&gt;			$config['new_image']= $data['new_image'];&lt;br /&gt;			$config['create_thumb'] =$data['create_thumb'];&lt;br /&gt;			$config['thumb_marker'] = $data['thumb_marker'];&lt;br /&gt;			&lt;br /&gt;			$config['maintain_ratio'] = TRUE;&lt;br /&gt;			$config['width'] = $data['width'];&lt;br /&gt;			$config['height'] = $data['height'];&lt;br /&gt;			&lt;br /&gt;			$this-&gt;CI-&gt;load-&gt;library('image_lib');&lt;br /&gt;			$this-&gt;CI-&gt;image_lib-&gt;clear();&lt;br /&gt;			$this-&gt;CI-&gt;image_lib-&gt;initialize($config);&lt;br /&gt;			if ( ! $this-&gt;CI-&gt;image_lib-&gt;resize())&lt;br /&gt;			{&lt;br /&gt;			    $error= $this-&gt;CI-&gt;image_lib-&gt;display_errors();&lt;br /&gt;			}&lt;br /&gt;			&lt;br /&gt;&lt;/code&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-5043246645600460559?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/5043246645600460559/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=5043246645600460559" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5043246645600460559?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5043246645600460559?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/05/php-codeigniter-creating-thumbnails.html" title="Php-codeigniter creating thumbnails" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUDQno4eyp7ImA9WxFSEk4.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-6388572201966231618</id><published>2010-04-14T14:41:00.001+05:30</published><updated>2010-04-14T14:41:13.433+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-14T14:41:13.433+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><title>Javascript: To get base url of website in javascript</title><content type="html">Use this script&lt;br /&gt;put in in a common js file.&lt;br /&gt;&lt;br /&gt;var domainbase ="http://" + window.location.toString().split("//")[1].split("/")[0] + "/";&lt;br /&gt;	var siteurl = domainbase + "site/";&lt;br /&gt;	var base_url = domainbase + "site/";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-6388572201966231618?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/6388572201966231618/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=6388572201966231618" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6388572201966231618?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6388572201966231618?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/04/javascript-to-get-base-url-of-website.html" title="Javascript: To get base url of website in javascript" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0YCQng5eSp7ImA9WxBbF0w.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-9046109533209235343</id><published>2010-03-16T10:14:00.002+05:30</published><updated>2010-03-16T10:22:43.621+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-16T10:22:43.621+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="codeigniter" /><title>Php - How to remove index.php from codeigniter url</title><content type="html">This is the best way to get ride of index.php from your website's url which is build using codeigniter framework.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;RewriteEngine On&lt;br /&gt;RewriteCond %{REQUEST_URI} ^system.*&lt;br /&gt;RewriteRule ^(.*)$ /index.php/$1 [L]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;RewriteRule ^(.*)$ index.php/$1 [L]&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;copy and paste the above code in  .htaccess file in your website root.Ensure that no extra  whitspaces are included before or after the codes.&lt;/p&gt;&lt;p&gt;In config.php you can replace&lt;br /&gt;&lt;/p&gt;$config['index_page'] = "index.php"; &lt;br /&gt;with this&lt;br /&gt;$config['index_page'] = "";&lt;br /&gt;&lt;br /&gt;Happy coding...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-9046109533209235343?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/9046109533209235343/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=9046109533209235343" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/9046109533209235343?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/9046109533209235343?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/03/php-how-to-remove-indexphp-from.html" title="Php - How to remove index.php from codeigniter url" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkMARnY_cSp7ImA9WxBRFUQ.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-9220353741265767377</id><published>2010-01-04T15:17:00.000+05:30</published><updated>2010-01-04T15:17:27.849+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-04T15:17:27.849+05:30</app:edited><title>Php - cake bake doesn't find new tables - CakePHP | Google Groups</title><content type="html">&lt;a href="http://groups.google.com/group/cake-php/browse_thread/thread/086b62c47de9d83d?pli=1"&gt;cake bake doesn't find new tables - CakePHP | Google Groups&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You have to clean the cache.&lt;br /&gt;Delete all files in tmp/cache/models.&lt;br /&gt;Best Regards&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-9220353741265767377?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="related" href="http://groups.google.com/group/cake-php/browse_thread/thread/086b62c47de9d83d?pli=1" title="Php - cake bake doesn't find new tables - CakePHP | Google Groups" /><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/9220353741265767377/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=9220353741265767377" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/9220353741265767377?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/9220353741265767377?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2010/01/php-cake-bake-doesnt-find-new-tables.html" title="Php - cake bake doesn't find new tables - CakePHP | Google Groups" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkAHR38_eyp7ImA9WxJVEE0.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-353429135273150990</id><published>2009-06-26T13:48:00.000+05:30</published><updated>2009-06-26T13:55:36.143+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-26T13:55:36.143+05:30</app:edited><title>Php- Table editable dynamic form with edit + selection (select / option) + checkbox.</title><content type="html">EditTable.htm&lt;br&gt; &lt;table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"  width="100%"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr  style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div  style="position: relative; right: 0px; display: inline; float: right; background-color: rgb(226, 226, 226);"&gt;       &lt;script type="text/javascript"&gt; 												&lt;!-- 												e9 = new Object(); 											    e9.size = "336x280,300x250,300x600"; 												//--&gt;&lt;/script&gt;       &lt;script type="text/javascript"  src="http://tags.expo9.exponential.com/tags/WeberDevcom/ROS/tags.js"&gt;&lt;/script&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &lt;a class="moz-txt-link-rfc2396E" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/a&gt;&amp;gt;       &lt;br&gt; &amp;lt;html xmlns=&lt;a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xhtml"&gt;"http://www.w3.org/1999/xhtml"&lt;/a&gt; lang="it"&amp;gt;       &lt;br&gt; &amp;lt;head&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Editable Table - by Fabio Pintore &amp;lt;/title&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta http-equiv="Content-Language" content="it" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta name="Robots" content="All" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta name="Description" content="Editable Table" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta name="Keywords" content="Tabella Editabile con campi fissi (edit) + selezione (select/option) + checkbox" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta name="Owner" content="Fabio Pintore (&lt;a class="moz-txt-link-abbreviated" href="mailto:f.pintore@tiscali.it"&gt;f.pintore@tiscali.it&lt;/a&gt;)" /&amp;gt; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta name="Author" content="Fabio Pintore (&lt;a class="moz-txt-link-abbreviated" href="mailto:f.pintore@tiscali.it"&gt;f.pintore@tiscali.it&lt;/a&gt;)" /&amp;gt;&amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;meta name="Copyright" content="Fabio Pintore (&lt;a class="moz-txt-link-abbreviated" href="mailto:f.pintore@tiscali.it"&gt;f.pintore@tiscali.it&lt;/a&gt;)" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;link rel="stylesheet" href="EditTable.css" /&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;script type="text/javascript" src="EditTable.js"&amp;gt;&amp;lt;/script&amp;gt;       &lt;br&gt; &amp;lt;/head&amp;gt;       &lt;br&gt; &amp;lt;body&amp;gt;       &lt;br&gt; &amp;lt;h1&amp;gt;Editable Table&amp;lt;/h1&amp;gt;       &lt;br&gt; &amp;lt;form name="FA"&amp;gt;       &lt;br&gt; &amp;lt;table cellpadding="0" cellspacing="0" border="0" class="editable" id="editable"&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;thead&amp;gt;&amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th width="200px"&amp;gt;Nome&amp;lt;/th&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th width="200px"&amp;gt;EMail&amp;lt;/th&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th width="90px"&amp;gt;Sesso&amp;lt;/th&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th width="30px"&amp;gt;Socio&amp;lt;/th&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;/thead&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;tbody&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Aldo Rossi&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;a class="moz-txt-link-abbreviated" href="mailto:a.rossi@emailserver.it"&gt;a.rossi@emailserver.it&lt;/a&gt;&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Maschio&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Si&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Maria Verdi&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;a class="moz-txt-link-abbreviated" href="mailto:m.verdi@emailserver.it"&gt;m.verdi@emailserver.it&lt;/a&gt;&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Femmina&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;No&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Marco Bianchi&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&lt;a class="moz-txt-link-abbreviated" href="mailto:marcobianchi@unaltroemailserver.it"&gt;marcobianchi@unaltroemailserver.it&lt;/a&gt;&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Maschio&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;Si&amp;lt;/td&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;/tbody&amp;gt;       &lt;br&gt; &amp;lt;/table&amp;gt;       &lt;br&gt; &amp;lt;br/&amp;gt;       &lt;br&gt; &amp;lt;br/&amp;gt;       &lt;br&gt; &amp;lt;script type="text/javascript"&amp;gt;       &lt;br&gt; var elArray = makeArray();       &lt;br&gt; var editable=new table.editable(elArray); &lt;br&gt; editable.init();&amp;nbsp; &amp;nbsp;       &lt;br&gt; &amp;lt;/script&amp;gt;       &lt;br&gt;       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;button type="button" onclick="editable.Insert();" name="Insert" value="INSERISCI"&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b&amp;gt;Inserisci&amp;lt;/b&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;/button&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;button type="reset" onclick="editable.Annulla();"&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b&amp;gt;Annulla&amp;lt;/b&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;/button&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;button type="button" onclick="editable.Apply();" name="Apply" value="APPLY"&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;b&amp;gt;Salva&amp;lt;/b&amp;gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;lt;/button&amp;gt;       &lt;br&gt;       &lt;br&gt; &amp;lt;/form&amp;gt;       &lt;br&gt; &amp;lt;br/&amp;gt;       &lt;br&gt; &amp;lt;br/&amp;gt;       &lt;br&gt; &amp;lt;a href=&lt;a class="moz-txt-link-rfc2396E" href="http://www.shooney.com/htm/examples/edittable/EditTable.zip"&gt;"http://www.shooney.com/htm/examples/edittable/EditTable.zip"&lt;/a&gt;&amp;gt;Download this example (Zip File)&amp;lt;/a&amp;gt;       &lt;br&gt; &amp;lt;/body&amp;gt;       &lt;br&gt; &amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; EditTable.js&lt;br&gt; &lt;table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"  width="100%"&gt;   &lt;tbody&gt;     &lt;tr  style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;******************************************************************************************************************************************************       &lt;br&gt; //&amp;nbsp; Author&amp;nbsp; &amp;nbsp; : Fabio Pintore (&lt;a class="moz-txt-link-abbreviated" href="mailto:f.pintore@tiscali.it"&gt;f.pintore@tiscali.it&lt;/a&gt;)       &lt;br&gt; //&amp;nbsp; Copyright : Fabio Pintore (&lt;a class="moz-txt-link-abbreviated" href="mailto:f.pintore@tiscali.it"&gt;f.pintore@tiscali.it&lt;/a&gt;)       &lt;br&gt; //&amp;nbsp; Date&amp;nbsp; &amp;nbsp; &amp;nbsp; : 18 Giugno 2009       &lt;br&gt; //&amp;nbsp; Descr&amp;nbsp; &amp;nbsp; &amp;nbsp;: Editable Table &lt;br&gt; //&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tabella Editabile con campi fissi (edit) + selezione (select/option) + checkbox       &lt;br&gt; //&amp;nbsp; Note&amp;nbsp; &amp;nbsp; &amp;nbsp; : [ IT IS FREEWARE ] Lo script &amp;#1496; liberamente e gratuitamente scaricabile e migliorabile.       &lt;br&gt; //&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mi piacerebbe sapere se vi &amp;#1496; stato di aiuto.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;       &lt;br&gt; // *******************************************************************************************************************************************************       &lt;br&gt; function oIElText(nameEl){&amp;nbsp; &amp;nbsp; this.nameEl=nameEl}       &lt;br&gt; oIElText.prototype.Draw = function(val, w0) { return ('&amp;lt;input class="inp" style="width:'+w0+'px" type="text" value="'+val+'" name="'+this.nameEl+'" /&amp;gt;'); }       &lt;br&gt; oIElText.prototype.GetValue = function() { return (eval('document.FA.'+this.nameEl+'.value') ); }       &lt;br&gt;       &lt;br&gt; function oIElCheck(nameEl){ this.nameEl=nameEl; }       &lt;br&gt; oIElCheck.prototype.Draw = function(val, w0) {       &lt;br&gt; &amp;nbsp; &amp;nbsp; var app='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; if (val=='Si') { app='checked="checked"' }       &lt;br&gt; &amp;nbsp; &amp;nbsp; return ('&amp;lt;input class="inp" type="checkbox" '+app+' value="'+val+'" name="'+this.nameEl+'" /&amp;gt;');       &lt;br&gt; }&amp;nbsp; &amp;nbsp; &lt;br&gt; oIElCheck.prototype.GetValue = function() { return ( eval('document.FA.'+this.nameEl+'.checked') ? 'Si':'No'); }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; function oIElComboOpt(dbcode, dbdescr){&amp;nbsp; &amp;nbsp; this.dbcode=dbcode;&amp;nbsp; &amp;nbsp; this.dbdescr=dbdescr;}       &lt;br&gt; function oIElCombo(nameEl, dbopt){this.nameEl=nameEl; this.dbopt=dbopt; }       &lt;br&gt; oIElCombo.prototype.Draw = function(val, w0) {       &lt;br&gt; &amp;nbsp; &amp;nbsp; var app=''; resHTML='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; resHTML='&amp;lt;select class="inp" style="width:'+w0+'px" name="'+this.nameEl+'" /&amp;gt;';       &lt;br&gt; &amp;nbsp; &amp;nbsp; var cb=this.dbopt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; for(var j=1;j&amp;lt;cb.length;j++){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; app='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cb[j].dbdescr == val) {app=' selected '}       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resHTML+='&amp;lt;option value="'+cb[j].dbcode+'" '+app+' &amp;gt;'+cb[j].dbdescr+'&amp;lt;/option&amp;gt;';       &lt;br&gt; &amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; resHTML+='&amp;lt;/select&amp;gt;';       &lt;br&gt; &amp;nbsp; &amp;nbsp; return (resHTML);       &lt;br&gt; }&amp;nbsp; &amp;nbsp; &lt;br&gt; oIElCombo.prototype.GetValue = function() { &lt;br&gt; &amp;nbsp; &amp;nbsp; var ret='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; var app=eval('document.FA.'+this.nameEl+'.value');       &lt;br&gt; &amp;nbsp; &amp;nbsp; var cb=this.dbopt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; for(var j=1;j&amp;lt;cb.length;j++){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cb[j].dbcode == app) {ret=cb[j].dbdescr;}       &lt;br&gt; &amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; return (ret);       &lt;br&gt; }       &lt;br&gt;       &lt;br&gt; function makeArray(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; var elArray = new Array();       &lt;br&gt; &amp;nbsp; &amp;nbsp; var optArray = new Array();       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; optArray[1] = new oIElComboOpt('M','Maschio');       &lt;br&gt; &amp;nbsp; &amp;nbsp; optArray[2] = new oIElComboOpt('F','Femmina');       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; elArray[0]=new oIElText('dbNome');       &lt;br&gt; &amp;nbsp; &amp;nbsp; elArray[1]=new oIElText('dbEMail');       &lt;br&gt; &amp;nbsp; &amp;nbsp; elArray[2]=new oIElCombo('dbSesso', optArray);       &lt;br&gt; &amp;nbsp; &amp;nbsp; elArray[3]=new oIElCheck('dbSocio');       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; return (elArray);       &lt;br&gt; }       &lt;br&gt;       &lt;br&gt; var table=function(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; function editable(elArray){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.t; this.w;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Clik=1; this.savedTX=0;this.savedValue=[];this.savedClassTX='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.elArray=elArray; this.Action='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; editable.prototype.init=function(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.t=document.getElementById('editable'); this.w=this.t.rows[0].cells.length;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(var i=1;i&amp;lt;this.t.rows.length;i++){&amp;nbsp; &amp;nbsp; this.t.rows[i].onclick = new Function('editable.doEdit(this)');&amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp;       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; editable.prototype.doEdit=function(tx){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var resHTML=''; w0=0;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.Clik==1){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Clik=0; this.Action="UPD"; this.savedTX = tx;&amp;nbsp; &amp;nbsp; &amp;nbsp;this.savedClassTX = tx.className;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.className='clik';       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.onclick='';       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i=0;i&amp;lt;this.w;i++){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w0 = tx.cells[i].offsetWidth;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.savedValue[i]=tx.cells[i].childNodes[0].nodeValue;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resHTML=''; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resHTML = this.elArray[i].Draw(this.savedValue[i], w0);       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.cells[i].innerHTML = resHTML;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else{       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.savedTX != tx) { alert ("devi salvare o annullare !") }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp; &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; editable.prototype.Annulla=function(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.Action=="UPD"){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i=0;i&amp;lt;this.w;i++){ this.savedTX.cells[i].innerHTML=this.savedValue[i]; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.savedTX.className=this.savedClassTX;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.savedTX.onclick = new Function('editable.doEdit(this)');       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.Action=="INS") {&amp;nbsp; this.t.deleteRow(-1); }&amp;nbsp; &amp;nbsp;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Action=""; this.Clik=1;       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; editable.prototype.Apply=function(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // FUTURE :&amp;nbsp; Validate Field - AjaxRequest - ....       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.TransactOK();       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; editable.prototype.Insert=function(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var z = Array(); resHTML=''; w0=0;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.Clik==1){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Clik=0; this.Action="INS"; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var x=this.t.insertRow(-1);       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.savedTX = x; this.savedClassTX=x.className; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x.className='clik';       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i=0;i&amp;lt;this.w;i++){ &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z[i]=x.insertCell(i);       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w0 = this.t.rows[0].cells[i].offsetWidth;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resHTML=''; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resHTML = this.elArray[i].Draw('', w0);       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z[i].innerHTML = resHTML;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else{ alert ("devi salvare o annullare !"); }       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; &amp;nbsp; &amp;nbsp; editable.prototype.TransactOK=function(){       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i=0;i&amp;lt;this.savedTX.cells.length;i++){&amp;nbsp; &amp;nbsp; &amp;nbsp;this.savedTX.cells[i].innerHTML=this.elArray[i].GetValue(); }       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Clik=1; this.Action=''; this.savedTX.className=this.savedClassTX;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.savedTX.onclick = new Function('editable.doEdit(this)');       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; return{editable:editable}       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;br&gt; }();&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; EditTable.css&lt;br&gt; &lt;table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"  width="100%"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr  style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;body {font:12px Verdana,Arial}       &lt;br&gt;       &lt;br&gt; .editable{border:1px solid #ccc; border-bottom:none}       &lt;br&gt; .editable th {padding:4px 6px 6px; background:#444; color:#fff; text-align:left; color:#ccc}       &lt;br&gt; .editable td {padding:2px 4px 4px; background:#fff; border-bottom:1px solid #ccc}       &lt;br&gt; .editable tr:hover {color:#ff0000;outline-style:solid;}       &lt;br&gt; .editable .clik td {background:#00ff80}       &lt;br&gt;       &lt;br&gt; .inp {font:12px Verdana,Arial}&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-353429135273150990?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/353429135273150990/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=353429135273150990" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/353429135273150990?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/353429135273150990?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/php-table-editable-dynamic-form-with.html" title="Php- Table editable dynamic form with edit + selection (select / option) + checkbox." /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0INRX47eCp7ImA9WxJVEE0.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-3464151476590797484</id><published>2009-06-26T13:02:00.000+05:30</published><updated>2009-06-26T13:03:14.000+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-26T13:03:14.000+05:30</app:edited><title>Php -  Blacklist IPs - Simple way to blacklist IP's, good for instance when you want to stop certain IP ranges known to be spammers.</title><content type="html">&lt;table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"  width="100%"&gt;   &lt;tbody&gt;     &lt;tr  style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;?php       &lt;br&gt;       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;IP_Blacklist&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$minimum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;null&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$maximum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;null&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ip &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;ip2long&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'REMOTE_ADDR'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;]);       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;is_null&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$minimum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;) === &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; &amp;nbsp; &amp;nbsp; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$minimum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;explode&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'.'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$minimum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;);       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$minimum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;=&amp;gt; &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$minimum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;] = (&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$value &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'*'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;) ? &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;0 &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;: &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$minimum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;ip2long&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;implode&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'.'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$minimum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;));       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ip &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;&amp;gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$minimum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;is_null&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$maximum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;) === &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; &amp;nbsp; &amp;nbsp; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$maximum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;explode&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'.'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$maximum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;);       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$maximum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;=&amp;gt; &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$maximum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;] = (&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$value &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'*'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;) ? &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;255 &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;: &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$maximum &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;ip2long&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;implode&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'.'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$maximum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;));       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ip &lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;&amp;lt;= &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;$maximum&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;;       &lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }       &lt;br&gt; &amp;nbsp; &amp;nbsp; }       &lt;br&gt;       &lt;br&gt; &amp;nbsp; &amp;nbsp; return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;true&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;;       &lt;br&gt; }       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; &lt;br&gt; Usage $_SERVER['REMOTE_ADDR'] = 195.22.23.24:&lt;br&gt; &lt;br&gt; &lt;table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"  width="100%"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr  style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div  style="position: relative; right: 0px; display: inline; float: right;"&gt;&lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;script language="javascript"  src="http://media.fastclick.net/w/get.media?sid=17328&amp;amp;m=6&amp;amp;tp=8&amp;amp;d=j&amp;amp;t=n"&gt;&lt;/script&gt;&amp;nbsp;&lt;noscript&gt;&lt;/noscript&gt; &lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php       &lt;br&gt; IP_Blacklist&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.22.23.*'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span  style="color: rgb(255, 128, 0);"&gt;// false, blacklisted       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IP_Blacklist&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.0.0.0'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.255.255.255'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span  style="color: rgb(255, 128, 0);"&gt;// false, blacklisted       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IP_Blacklist&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.22.23.25'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.22.23.255'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span  style="color: rgb(255, 128, 0);"&gt;// true, clean       &lt;br&gt;       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if (&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;IP_Blacklist&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.22.23.*'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(221, 0, 0);"&gt;'195.22.23.*'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;) === &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;)       &lt;br&gt; {       &lt;br&gt; &amp;nbsp; &amp;nbsp; die(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'Nice try spammer.'&lt;/span&gt;&lt;span  style="color: rgb(0, 119, 0);"&gt;);       &lt;br&gt; }       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-3464151476590797484?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/3464151476590797484/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=3464151476590797484" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/3464151476590797484?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/3464151476590797484?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/php-blacklist-ips-simple-way-to.html" title="Php -  Blacklist IPs - Simple way to blacklist IP's, good for instance when you want to stop certain IP ranges known to be spammers." /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkANRHw4eSp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-7338099339121509059</id><published>2009-06-22T09:47:00.002+05:30</published><updated>2009-06-25T14:36:35.231+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:36:35.231+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Google Currency Converter" /><title>PHP- Google Currency Converter - Convert variable amounts between currencies with a little help from our friend Google.</title><content type="html">&lt;table width="100%" bg border="0" cellpadding="0" cellspacing="0" style="color:#f5f4f4;"&gt;   &lt;tbody&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$amount&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$from&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$to&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;{      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= array();      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_match&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'~&amp;lt;b&amp;gt;.+? = (.+?)&amp;lt;/b&amp;gt;&amp;lt;/h2&amp;gt;~'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_get_contents&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'&lt;a class="moz-txt-link-freetext" href="http://www.google.com/search?q="&gt;http://www.google.com/search?q=&lt;/a&gt;' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;urlencode&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;floatval&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$amount&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;' ' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strtoupper&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$from&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;' to ' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strtoupper&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$to&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;))), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;    {      &lt;br /&gt;        if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;array_key_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) === &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;        {      &lt;br /&gt;            return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;floatval&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;}      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right;"&gt;&lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;script language="javascript" src="http://media.fastclick.net/w/get.media?sid=17328&amp;amp;m=6&amp;amp;tp=8&amp;amp;d=j&amp;amp;t=n"&gt;&lt;/script&gt; &lt;noscript&gt;&lt;/noscript&gt; &lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'USD'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'EUR'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// 0.768816791      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'USD'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'GBP'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// 0.686671702      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'EUR'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'USD'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// 1.3007      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'EUR'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'GBP'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// 0.893153883      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'GBP'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'USD'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// 1.4563      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;Google_Currency&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'GBP'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'EUR'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// 1.11962789      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-7338099339121509059?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/7338099339121509059/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=7338099339121509059" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/7338099339121509059?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/7338099339121509059?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/php-google-currency-converter-convert.html" title="PHP- Google Currency Converter - Convert variable amounts between currencies with a little help from our friend Google." /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkADSH49eyp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-111651498272033441</id><published>2009-06-22T09:40:00.002+05:30</published><updated>2009-06-25T14:36:19.063+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:36:19.063+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Link Submition" /><title>Link Submition - Allow your visitors to submit links to the site.</title><content type="html">Install Instructions.&lt;br /&gt;---------------------&lt;br /&gt;&lt;br /&gt;1) Add your information in the variables.php, which is fully commented to make&lt;br /&gt;it easy for you. You should not have to change the first 2 variables. The other&lt;br /&gt;variables are for the Page Title, Text and links above and below on the page.&lt;br /&gt;&lt;br /&gt;2) Upload linklist.php, footer.php, header.php, submit.php, variables.php, index.php,&lt;br /&gt;emails.txt and links.txt in ASCII mode to the directory /linklist. Then, upload&lt;br /&gt;browser.gif to the directory /images in BINARY or Auto mode.&lt;br /&gt;&lt;br /&gt;3) CHMOD emails.txt and links.txt 777.&lt;br /&gt;&lt;br /&gt;3) Your done, to view your Link List page, go to &lt;a class="moz-txt-link-abbreviated" href="http://www.yourdomain.com/links/index.php"&gt;www.yourdomain.com/links/index.php&lt;/a&gt;.&lt;br /&gt;To add a link, go to &lt;a class="moz-txt-link-abbreviated" href="http://www.yourdomain.com/links/submit.php"&gt;www.yourdomain.com/links/submit.php&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;footer.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right; background-color: rgb(226, 226, 226);"&gt;       &lt;script type="text/javascript"&gt;             &lt;!--             e9 = new Object();                e9.size = "336x280,300x250,300x600";             //--&gt;&lt;/script&gt;       &lt;script type="text/javascript" src="http://tags.expo9.exponential.com/tags/WeberDevcom/ROS/tags.js"&gt;&lt;/script&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;center&amp;gt;      &lt;br /&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;font &amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);font-size:130%;"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text3 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text4 ?&amp;gt;&lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;  &amp;lt;a href="&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$url2 ?&amp;gt;&lt;/span&gt;" target=_blank"&amp;gt;&lt;br /&gt;  &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$urltext2 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;  &amp;lt;/a&amp;gt;&amp;lt;/font&amp;gt; &amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;div align="center"&amp;gt;&amp;lt;a href="submit.php"&amp;gt;&amp;lt;font size="3" face="Verdana, Arial, Helvetica, sans-serif"&amp;gt;Click&lt;br /&gt;  Here To Submit Your Site&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;index.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right;"&gt;&lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;script language="javascript" src="http://media.fastclick.net/w/get.media?sid=17328&amp;amp;m=6&amp;amp;tp=8&amp;amp;d=j&amp;amp;t=n"&gt;&lt;/script&gt; &lt;noscript&gt;&lt;/noscript&gt; &lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;include &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"header.php"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;      &lt;br /&gt;&amp;lt;?php      &lt;br /&gt;$data &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'links.txt'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$data &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;array_reverse&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$data&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$data &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$element&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$element &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;trim&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$element&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$pieces &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;explode&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"|"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$element&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$pieces&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] . &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$pieces&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$pieces&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;}      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;include &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"footer.php"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;header.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;require &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"variables.php"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;html&amp;gt;      &lt;br /&gt;&amp;lt;head&amp;gt;      &lt;br /&gt;&amp;lt;title&amp;gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$title ?&amp;gt;&lt;/span&gt; &amp;lt;/title&amp;gt;      &lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&amp;gt;      &lt;br /&gt;&amp;lt;body bgcolor="#006699" text="#FFFFFF" link="#FFFFFF" vlink="#FFFF00" alink="#FF0000"&amp;gt;&amp;lt;font color="#FFFFFF" size="1" face="verdana"&amp;gt;&lt;br /&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;center&amp;gt;&amp;lt;font size="4"&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text1 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text2 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;  &amp;lt;a href="&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$url1 ?&amp;gt;&lt;/span&gt;" target=_blank"&amp;gt;&lt;br /&gt;  &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$urltext1 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;  &amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;      &lt;br /&gt;     &lt;br /&gt;&amp;lt;div align="center"&amp;gt;&amp;lt;a href="submit.php"&amp;gt;&amp;lt;font size="3" face="Verdana, Arial, Helvetica, sans-serif"&amp;gt;Click Here To Submit Your Site&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;submit.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;require &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"variables.php"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;html&amp;gt;      &lt;br /&gt;&amp;lt;head&amp;gt;      &lt;br /&gt;&amp;lt;title&amp;gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$title ?&amp;gt;&lt;/span&gt; &amp;lt;/title&amp;gt;      &lt;br /&gt;&amp;lt;/head&amp;gt;      &lt;br /&gt;&amp;lt;body bgcolor="#006699" text="#FFFFFF" link="#FFFFFF" vlink="#FFFF00" alink="#FF0000"&amp;gt;      &lt;br /&gt;&amp;lt;center&amp;gt;&amp;lt;font size="4"&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text1 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text2 ?&amp;gt;&lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;a href="&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$url1 ?&amp;gt;&lt;/span&gt;" target=_blank"&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$urltext1 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt; &amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;      &lt;br /&gt;  &amp;lt;font color="#000000"&amp;gt;Submit you site for an Instant Free Listing&amp;lt;/font&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;&amp;lt;/center&amp;gt; &amp;lt;FORM METHOD="POST" ACTION="linklist.php"&amp;gt;      &lt;br /&gt;  &amp;lt;table width="500" border="0" align="center" cellpadding="2" cellspacing="2"&amp;gt;      &lt;br /&gt;    &amp;lt;tr&amp;gt;&lt;br /&gt;      &amp;lt;td&amp;gt;&amp;lt;div align="right"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&amp;gt;Website&lt;br /&gt;          Name:&amp;lt;/font&amp;gt;&amp;lt;/strong&amp;gt; &amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;      &amp;lt;td&amp;gt; &amp;lt;div align="left"&amp;gt;&lt;br /&gt;          &amp;lt;INPUT TYPE="text" NAME="wsname" SIZE="30"&amp;gt;      &lt;br /&gt;        &amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;    &amp;lt;/tr&amp;gt;      &lt;br /&gt;    &amp;lt;tr&amp;gt;&lt;br /&gt;      &amp;lt;td width="105"&amp;gt;&amp;lt;div align="right"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&amp;gt;Website&lt;br /&gt;          URL:&amp;lt;/font&amp;gt;&amp;lt;/strong&amp;gt; &amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;      &amp;lt;td width="195"&amp;gt; &amp;lt;div align="left"&amp;gt;no &lt;a class="moz-txt-link-freetext" href="http:///"&gt;http://&lt;/a&gt; just &lt;a class="moz-txt-link-abbreviated" href="http://www.%c2%a0/"&gt;www.&amp;amp;nbsp&lt;/a&gt;;&lt;br /&gt;          &amp;lt;INPUT TYPE="text" NAME="wsurl" SIZE="24"&amp;gt;      &lt;br /&gt;        &amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;    &amp;lt;/tr&amp;gt;      &lt;br /&gt;    &amp;lt;tr&amp;gt;&lt;br /&gt;      &amp;lt;td&amp;gt;&amp;lt;div align="right"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&amp;gt;Description:&amp;lt;/font&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;      &amp;lt;td&amp;gt;&amp;lt;textarea name="description" cols="26"&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;    &amp;lt;/tr&amp;gt;      &lt;br /&gt;    &amp;lt;tr&amp;gt;&lt;br /&gt;      &amp;lt;td&amp;gt;&amp;lt;div align="right"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&amp;gt;Email:&amp;lt;/font&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;      &amp;lt;td&amp;gt;&amp;lt;input type="text" NAME="email"&amp;gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;    &amp;lt;/tr&amp;gt;      &lt;br /&gt;    &amp;lt;tr&amp;gt;&lt;br /&gt;      &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;      &lt;br /&gt;      &amp;lt;td&amp;gt;&amp;lt;div align="center"&amp;gt;By Submitting your link you agree to recieve mailings&lt;br /&gt;          from us.&amp;lt;br&amp;gt;      &lt;br /&gt;          &amp;lt;INPUT TYPE="submit" value="Submit!"&amp;gt;      &lt;br /&gt;        &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;      &lt;br /&gt;      &amp;lt;/td&amp;gt;      &lt;br /&gt;    &amp;lt;/tr&amp;gt;      &lt;br /&gt;  &amp;lt;/table&amp;gt;      &lt;br /&gt;&amp;lt;/form&amp;gt;      &lt;br /&gt;     &lt;br /&gt;&amp;lt;center&amp;gt;&amp;lt;font size="4"&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text1 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text2 ?&amp;gt;&lt;/span&gt;&amp;lt;br&amp;gt;      &lt;br /&gt;&amp;lt;a href="&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$url2 ?&amp;gt;&lt;/span&gt;" target=_blank"&amp;gt;      &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$urltext2 ?&amp;gt;      &lt;br /&gt;      &lt;/span&gt; &amp;lt;/a&amp;gt;&amp;lt;/font&amp;gt;      &lt;br /&gt;&amp;lt;/center&amp;gt;      &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;linklist.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;require &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"variables.php"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$wsname &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"You must fill out a site name."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;exit;      &lt;br /&gt;}&lt;br /&gt;else      &lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$wsurl &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"You must fill out a site URL."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;exit;      &lt;br /&gt;}      &lt;br /&gt;else      &lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$description &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"You must put a description."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;exit;      &lt;br /&gt;}      &lt;br /&gt;else      &lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"You must enter your email."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;exit;      &lt;br /&gt;}      &lt;br /&gt;else      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$textfile &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= (&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"links.txt"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$textfile2 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= (&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"emails.txt"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fp &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;fopen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$textfile&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"a+"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;fputs &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fp&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;center&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td bgcolor=666666 width=500 height=20&amp;gt;&amp;lt;font size=2&amp;gt;&amp;lt;img src=$imagedir/browser.gif&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;a href=&lt;a class="moz-txt-link-freetext" href="http://$wsurl/"&gt;http://$wsurl&lt;/a&gt; target=_blank&amp;gt;&amp;lt;font size=4&amp;gt;$wsname&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td bgcolor=cccccc width=400&amp;gt;&amp;lt;font size=2&amp;gt;&amp;lt;font color=000000&amp;gt;$description&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;fclose&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fp&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fp &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;fopen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$textfile2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"a+"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;fputs &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fp&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$email\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;fclose&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fp&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;html&amp;gt; &amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;&amp;lt;body bgcolor=006699 text=FFFFFF link=FFFFFF vlink=FFFF00 alink=FF0000&amp;gt;&amp;lt;font color=FFFFFF size=3 face=verdana&amp;gt;&amp;lt;br&amp;gt;&amp;lt;center&amp;gt;&amp;lt;br&amp;gt; $text1&amp;lt;br&amp;gt;$text2 &amp;lt;br&amp;gt;&amp;lt;a href=\"$url1 \" target=_blank\"&amp;gt;  $urltext1&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Your site has been successfully added. &amp;lt;a href=$viewpage&amp;gt;Click here&amp;lt;/a&amp;gt; to view the Link List page.&amp;lt;/center&amp;gt;&amp;lt;/html&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;variables.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// This is the page where you will put your free for fall links on. This is a URL!      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$viewpage &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"index.php"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// The directory to where you will upload your images. DO NOT END WITH TRAILING SLASH!      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imagedir &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"images"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Website Title      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$title &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Title Of Link Page"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Text 1 for top of pages      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text1 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Your Text Here"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Text 2 for top of pages      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text2 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Second Line of Text"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Link for Top Of Page      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$url1 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;&lt;a class="moz-txt-link-rfc2396E" href="http://www.yahoo.com/"&gt;"http://www.yahoo.com"&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;//URL 1 Text      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$urltext1 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Text Of URL"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Text 1 for bottom of pages      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text3 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Your Text Here"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Text 2 for bottom of pages      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$text4 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Second Line of Text"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Link for Top Of Page      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$url2 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;&lt;a class="moz-txt-link-rfc2396E" href="http://www.google.com/"&gt;"http://www.google.com"&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;//URL 1 Text      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$urltext2 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Text Of URL"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-111651498272033441?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/111651498272033441/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=111651498272033441" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/111651498272033441?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/111651498272033441?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/link-submition-allow-your-visitors-to.html" title="Link Submition - Allow your visitors to submit links to the site." /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8FQ3Yyfip7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-6158767379208077625</id><published>2009-06-22T09:38:00.002+05:30</published><updated>2009-06-25T14:36:52.896+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:36:52.896+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Customer feedback" /><title>PHP -   Customer feedback or simple emailer - A PHP script that enables your visitors to send you emails.</title><content type="html">readme.txt&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right; background-color: rgb(226, 226, 226);"&gt;       &lt;script type="text/javascript"&gt;             &lt;!--             e9 = new Object();                e9.size = "336x280,300x250,300x600";             //--&gt;&lt;/script&gt;       &lt;script type="text/javascript" src="http://tags.expo9.exponential.com/tags/WeberDevcom/ROS/tags.js"&gt;&lt;/script&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;INSTALLATION AND CONFIGURATION      &lt;br /&gt;     &lt;br /&gt;** One major change in version 3.0. You no longer link to emailer.php. You link to whatever form you want to process.      &lt;br /&gt;   Now, the action of that form has to direct to emailer.php as shown in the sample form.      &lt;br /&gt;     &lt;br /&gt;1- Edit emailer_form.php (or any other form for that matter) by building the form you desire. See reference below for hidden field options.      &lt;br /&gt;2- Be sure the action of the form is aimed at the emailer.php file      &lt;br /&gt;3- Build the "Thanks" and/or "Error" page(s) if you choose the custom option      &lt;br /&gt;4- Edit the top few variable at the top of emailer.php to suit your needs, the available variables are as follows:      &lt;br /&gt;     &lt;br /&gt;      &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// recipient configuration - this is the array of recipients for the form, the number in the brackets&lt;br /&gt;// must match the number in the "recipient_group" hidden field explained below      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// General Variables      &lt;br /&gt;// whether or not to check the referrer, 1 for yes, 0 for no      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$check_referrer&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// domains allowed to use the emailer, with and without www      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$referring_domains&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;&lt;a class="moz-txt-link-rfc2396E" href="http://domain.com/,http://www.domain.com/"&gt;"http://domain.com/,http://www.domain.com/"&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Default Error and Success Page Variables      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page_title&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Error - Missed Fields"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page_text&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Please use your browser's back button to return to the form and complete the required fields."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page_title&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Message Sent"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page_text&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Thank you for your inquiry"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&lt;br /&gt;HIDDEN FIELD OPTIONS      &lt;br /&gt;subject - The subject of the email to be sent      &lt;br /&gt;reply_to_field - The name of the field that should be put in the "from" field of the email      &lt;br /&gt;required_fields - a comma separated list of fieldname to be validated for content      &lt;br /&gt;required_email_fields - a comma delimited list of fields to be validated for valid email address syntax      &lt;br /&gt;recipient_group - the number that refers to the number in the brackets of the list of recipients to recieve this email      &lt;br /&gt;error_page - the filename (and path if necessary) to a custom error page, if missing or blank default text in variable above will be used      &lt;br /&gt;thanks_page - the filename (and path if necessary) to a custom thanks page, if missing or blank default text in variable above will be used      &lt;br /&gt;send_copy - whether or not to send a copy of the mail to the sender      &lt;br /&gt;copy_subject - subject of sent copy      &lt;br /&gt;copy_tomail_field - field of email address to the sender for the sent copy      &lt;br /&gt;mail_type - layout of email options are "vert_table" or "horz_table", anything else will result in plain text email      &lt;br /&gt;mail_priority - 1 is high, 3 is normal      &lt;br /&gt;return_ip -  do you want the IP of the sender returned with the email if available? 1 is yes, 0 is no      &lt;br /&gt;     &lt;br /&gt;NOTES:      &lt;br /&gt;&amp;gt; To call the form link to the emailer.php file NOT the emailer_form.php!      &lt;br /&gt;&amp;gt; DO NOT use spaces in the field names of your form. A good option is to use an underscore ("_") instead.      &lt;br /&gt;&amp;gt; When making the form, always include the &lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fieldname&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt; as the value of each field. This will make the field populate with the previously entered information should someone not fill out all required fields and see the default error page.      &lt;br /&gt;&amp;gt; the recipients_group hidden field may seem confusing, but it is done this way to prevent spambots from harvesting actual email addresses from hidden fields the way many scripts do&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;header.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right;"&gt;&lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;script language="javascript" src="http://media.fastclick.net/w/get.media?sid=17328&amp;amp;m=6&amp;amp;tp=8&amp;amp;d=j&amp;amp;t=n"&gt;&lt;/script&gt; &lt;noscript&gt;&lt;/noscript&gt; &lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" &lt;a class="moz-txt-link-rfc2396E" href="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&lt;/a&gt;&amp;gt;      &lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Feedback Form&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&amp;gt;      &lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;      &lt;br /&gt;&amp;lt;table style="width:600px;border-style:none;" cellpadding="0" cellspacing="0"&amp;gt;      &lt;br /&gt;&amp;lt;tr&amp;gt;      &lt;br /&gt;    &amp;lt;td align="left" valign="top"&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;emailer_form.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;&amp;lt;html&amp;gt;      &lt;br /&gt;&amp;lt;head&amp;gt;      &lt;br /&gt;&amp;lt;title&amp;gt;dB Masters FormMailer 3.0&amp;lt;/title&amp;gt;      &lt;br /&gt;&amp;lt;/head&amp;gt;      &lt;br /&gt;&amp;lt;body&amp;gt;      &lt;br /&gt;&amp;lt;form id="form" method="post" action="emailer.php"&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Your Name&amp;lt;br /&amp;gt;&amp;lt;input type="text" name="Name" value="&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$Name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;" /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Your Email&amp;lt;br /&amp;gt;&amp;lt;input type="text" name="Email" value="&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$Email&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;" /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Comments and/or Questions&amp;lt;br /&amp;gt;&amp;lt;text area name="Comments" rows="5" cols="40"&amp;gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$Comments&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/text area&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;      &lt;br /&gt;&amp;lt;input type="submit" name="Submit" value="Submit" /&amp;gt;&lt;br /&gt;&amp;lt;input type="reset" name="Reset" value="Clear Form" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="subject" value="Subject of Email" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="reply_to_field" value="Email" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="required_fields" value="Name,Comments" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="required_email_fields" value="Email" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="recipient_group" value="0" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="error_page" value="" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="thanks_page" value="" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="send_copy" value="no" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="copy_subject" value="Subject of Copy Email" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="copy_tomail_field" value="Email" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="mail_type" value="vert_table" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="mail_priority" value="1" /&amp;gt;      &lt;br /&gt;&amp;lt;input type="hidden" name="return_ip" value="1" /&amp;gt;      &lt;br /&gt;&amp;lt;/p&amp;gt;      &lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;      &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;footer.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;?&amp;gt;      &lt;br /&gt;      &lt;/span&gt;    &amp;lt;/td&amp;gt;      &lt;br /&gt;&amp;lt;/tr&amp;gt;      &lt;br /&gt;&amp;lt;tr&amp;gt;      &lt;br /&gt;&amp;lt;td class="bodysm"&amp;gt;      &lt;br /&gt;&amp;lt;/td&amp;gt;      &lt;br /&gt;&amp;lt;/tr&amp;gt;      &lt;br /&gt;&amp;lt;/table&amp;gt;      &lt;br /&gt;&amp;lt;/body&amp;gt;      &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;emailer.php&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// recipient configuration      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;&lt;a class="moz-txt-link-rfc2396E" href="mailto:you@domain.com"&gt;"you@domain.com"&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// General Variables      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$check_referrer&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$referring_domains&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;&lt;a class="moz-txt-link-rfc2396E" href="http://domain.com/,http://www.domain.com/"&gt;"http://domain.com/,http://www.domain.com/"&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Default Error and Success Page Variables      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page_title&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Error - Missed Fields"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page_text&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Please use your browser's back button to return to the form and complete the required fields."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page_title&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Message Sent"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page_text&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Thank you for your inquiry"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/////////////////////////////////////////////////////////////////////////      &lt;br /&gt;// Don't muck around past this line unless you know what you are doing //      &lt;br /&gt;/////////////////////////////////////////////////////////////////////////      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;ob_start&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$required_fields&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_fields"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$required_email_fields&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_email_fields"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$recipients&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"recipient_group"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"error_page"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"thanks_page"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$send_copy&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"send_copy"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$copy_subject&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_subject"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$copy_tomail_field&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_tomail_field"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_type"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_priority&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_priority"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$return_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"return_ip"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Submit"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Submit"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;{      &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$check_referrer&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;    {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ref_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_split&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/,/'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$referring_domains&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ref_run&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ref_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$referer&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'HTTP_REFERER'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$domain_chk&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"no"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        for(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ref_run&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;++)      &lt;br /&gt;        {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_domain&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ref_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stristr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$referer&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_domain&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)){&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$domain_chk&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"yes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;}      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;    else      &lt;br /&gt;    {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$domain_chk&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"yes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$domain_chk&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"yes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;    {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"yes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$req_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_split&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/,/'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$required_fields&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$req_run&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$req_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        for(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$req_run&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;++)      &lt;br /&gt;        {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_field_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$req_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_field&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_field_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_field&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"You are missing the "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$req_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;].&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;" field&amp;lt;br /&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"no"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;        }      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_split&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/,/'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$required_email_fields&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email_run&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        for(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email_run&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;++)      &lt;br /&gt;        {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_email_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_email&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_email_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_email&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;|| !&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;eregi&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;&lt;a class="moz-txt-link-rfc2396E" href="mailto:%5E%5B_%5C.0-9a-z-%5D+@%28%5B0-9a-z%5D%5B0-9a-z-%5D+%5C.%29+%5Ba-z%5D%7B2,6%7D$"&gt;"^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$"&lt;/a&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cur_email&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;))      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"You are missing the "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$email_check&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;].&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;" field or the email is not a valid email address.&amp;lt;br /&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"no"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;        }      &lt;br /&gt;        if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"yes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;        {      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;getenv&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;HTTP_X_FORWARDED_FOR&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;))      &lt;br /&gt;            {&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$user_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;getenv&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"HTTP_X_FORWARDED_FOR"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);}      &lt;br /&gt;            else      &lt;br /&gt;            {&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$user_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;getenv&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"REMOTE_ADDR"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);}      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"vert_table"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"&amp;gt;      &lt;br /&gt;                            &amp;lt;html&amp;gt;      &lt;br /&gt;                            &amp;lt;head&amp;gt;&amp;lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"&amp;gt;&amp;lt;/head&amp;gt;      &lt;br /&gt;                            &amp;lt;body&amp;gt;      &lt;br /&gt;                            &amp;lt;table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\"&amp;gt;\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stripslashes&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/(&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/%5C/%5C/+"&gt;http:\/\/+&lt;/a&gt;.[^\s]+)/i"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'&amp;lt;a href="\\1"&amp;gt;\\1&amp;lt;/a&amp;gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;nl2br&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Submit" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_email_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"recipient_group" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"error_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"thanks_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"send_copy" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_tomail_field" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_type" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_priority" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"return_ip"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                    {      &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;tr&amp;gt;\n&amp;lt;td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"&amp;gt;&amp;lt;b&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;\n&amp;lt;td align=\"left\" valign=\"top\" width=\"100%\"&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                    }      &lt;br /&gt;                }      &lt;br /&gt;                if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$return_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;tr&amp;gt;\n&amp;lt;td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"&amp;gt;&amp;lt;b&amp;gt;Sender IP&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;\n&amp;lt;td align=\"left\" valign=\"top\" width=\"100%\"&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$user_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                }      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\n&amp;lt;/table&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;            else if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"horz_table"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"&amp;gt;      &lt;br /&gt;                            &amp;lt;html&amp;gt;      &lt;br /&gt;                            &amp;lt;head&amp;gt;&amp;lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"&amp;gt;&amp;lt;/head&amp;gt;      &lt;br /&gt;                            &amp;lt;body&amp;gt;      &lt;br /&gt;                            &amp;lt;table cellpadding=\"2\" cellspacing=\"0\" border=\"1\"&amp;gt;\n      &lt;br /&gt;                            &amp;lt;tr&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Submit" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_email_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"recipient_group" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"error_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"thanks_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"send_copy" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_tomail_field" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_type" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_priority" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"return_ip"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                    {      &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\n&amp;lt;td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"&amp;gt;&amp;lt;b&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                    }      &lt;br /&gt;                }      &lt;br /&gt;                if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$return_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"&amp;gt;&amp;lt;b&amp;gt;Sender IP&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                }      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/tr&amp;gt;\n&amp;lt;tr&amp;gt;\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stripslashes&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/(&lt;a class="moz-txt-link-freetext" href="http://www.blogger.com/%5C/%5C/+"&gt;http:\/\/+&lt;/a&gt;.[^\s]+)/i"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'&amp;lt;a href="\\1"&amp;gt;\\1&amp;lt;/a&amp;gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;nl2br&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Submit" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_email_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"recipient_group" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"error_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"thanks_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"send_copy" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_tomail_field" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_type" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_priority" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"return_ip"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                    {      &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\n&amp;lt;td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/td&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                    }      &lt;br /&gt;                }      &lt;br /&gt;                if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$return_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$user_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;/td&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                }      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\n&amp;lt;/tr&amp;gt;\n&amp;lt;/table&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;            else      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Form Results"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stripslashes&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;nl2br&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Submit" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"required_email_fields" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"recipient_group" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"error_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"thanks_page" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"send_copy" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_subject" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"copy_tomail_field" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_type" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"mail_priority" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"return_ip"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                    {      &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$key&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;": "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$value&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                    }      &lt;br /&gt;                }      &lt;br /&gt;                if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$return_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Sender IP: "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$user_ip&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                }      &lt;br /&gt;            }      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"From: "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$reply_to_field&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;].&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"X-Priority: $mail_priority\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$recipients&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$recipients&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Cc: $cc_tomail;\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$bcc_tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Bcc: $bcc_tomail[$recipients]\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }&lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"horz_table" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;|| &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"vert_table"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$subject&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"subject"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$tomail&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$recipients&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mail &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$tomail"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$subject"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$message"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$extra"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$send_copy&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"yes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$copy_extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"From: $Name&amp;lt;$Email&amp;gt;\nX-Priority: $mail_priority\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"horz_table" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;|| &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mail_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"vert_table"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;                {      &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$copy_extra&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                }      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$copy_address&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_POST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$copy_tomail_field&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mail &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$copy_address"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$copy_subject"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$message"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"$copy_extra"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            }      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;$thanks_page_title&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;$thanks_page_text&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;            else      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;ob_end_clean&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$redirect&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Location: "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$thanks_page&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$redirect&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            }      &lt;br /&gt;        }      &lt;br /&gt;        else      &lt;br /&gt;        {      &lt;br /&gt;            if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;            {      &lt;br /&gt;                echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;$error_page_title&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                echo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_message&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;$error_page_text&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;            }      &lt;br /&gt;            else      &lt;br /&gt;            {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;ob_end_clean&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$redirect&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Location: "&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$error_page&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$redirect&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            }      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;    else      &lt;br /&gt;    {      &lt;br /&gt;        echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;Sorry, mailing request came from an unauthorized domain.&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;}      &lt;br /&gt;else      &lt;br /&gt;{      &lt;br /&gt;    echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;Error&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"&amp;lt;p&amp;gt;No form data has been sent to the script&amp;lt;/p&amp;gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;}      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;ob_end_flush&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-6158767379208077625?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/6158767379208077625/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=6158767379208077625" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6158767379208077625?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/6158767379208077625?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/php-customer-feedback-or-simple-emailer.html" title="PHP -   Customer feedback or simple emailer - A PHP script that enables your visitors to send you emails." /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8HQXo5eyp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-9091484482708993177</id><published>2009-06-22T09:33:00.002+05:30</published><updated>2009-06-25T14:37:10.423+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:37:10.423+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Thumbnail script" /><title>PHP - Thumbnail script - Generate thumbnails on the fly.</title><content type="html">Thumbnails are basically a complicated yet effective way to save bandwidth. Although saving thumbnails as seperate images may make things simpler, generating thumbs on the fly help saving space and takes very little processing time in return.&lt;br /&gt;&lt;br /&gt;Check the file for code and instructions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right; background-color: rgb(226, 226, 226);"&gt;       &lt;script type="text/javascript"&gt;             &lt;!--             e9 = new Object();                e9.size = "336x280,300x250,300x600";             //--&gt;&lt;/script&gt;       &lt;script type="text/javascript" src="http://tags.expo9.exponential.com/tags/WeberDevcom/ROS/tags.js"&gt;&lt;/script&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/*      &lt;br /&gt;    Paramters      &lt;br /&gt;    ---------      &lt;br /&gt;    w: width      &lt;br /&gt;    h: height      &lt;br /&gt;    zc: zoom crop (0 or 1)      &lt;br /&gt;    q: quality (default is 75 and max is 100)      &lt;br /&gt;   &lt;br /&gt;    HTML example: &amp;lt;img src="/scripts/Thumbnail.php?src=/images/whatever.jpg&amp;amp;w=150&amp;amp;h=200&amp;amp;zc=1" alt="" /&amp;gt;      &lt;br /&gt;*/      &lt;br /&gt;     &lt;br /&gt;/*      &lt;br /&gt;$sizeLimits = array(      &lt;br /&gt;    "100x100",      &lt;br /&gt;    "150x150",      &lt;br /&gt;);      &lt;br /&gt;*/      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;define&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"CACHE_SIZE"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;200&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// number of files to store before clearing cache      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;define&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"CACHE_CLEAR"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// maximum number of files to delete on each cache clear      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;define&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"VERSION"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"1.08"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// version number (to force a cache refresh      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= array(      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"1" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_NEGATE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"2" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_GRAYSCALE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"3" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_BRIGHTNESS&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"4" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_CONTRAST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"5" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_COLORIZE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"6" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_EDGEDETECT&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"7" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_EMBOSS&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"8" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_GAUSSIAN_BLUR&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"9" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_SELECTIVE_BLUR&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"10" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_MEAN_REMOVAL&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"11" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; array(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;IMG_FILTER_SMOOTH&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;),      &lt;br /&gt;);      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// sort out image source      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"src"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"" &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;|| &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;lt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"no image specified"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// clean params before use      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;cleanSource&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// last modified time (for caching)      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$lastModified &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filemtime&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// get properties      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width         &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/[^0-9]+/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"w"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height     &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/[^0-9]+/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"h"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$zoom_crop         &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/[^0-9]+/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"zc"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$quality         &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/[^0-9]+/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"q"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;80&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filters        &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"f"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// set path to cache directory (default is ./cache)      &lt;br /&gt;// this can be changed to a different location      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'./cache'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// get mime type of src      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// check to see if this image is in the cache already      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;check_cache&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// if not in cache then clear some space and generate a new file      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;cleanCache&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;ini_set&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'memory_limit'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"30M"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// make sure that the src is gif/jpg/png      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if(!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;valid_src_mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Invalid src mime type: " &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// check to see if GD function exist      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if(!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;function_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'imagecreatetruecolor'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"GD Library Error: imagecreatetruecolor does not exist"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// open the existing image      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;open_image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=== &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'Unable to open image : ' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Get original width and height      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagesx&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagesy&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// don't allow new width or height to be greater than the original      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;    if( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// generate new w/h if not provided      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; !&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;    } elseif(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; !&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;    } elseif(!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;amp;&amp;amp; !&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;       &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// create a new true color image      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecreatetruecolor&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagealphablending&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Create a new transparent color for image      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$color &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecolorallocatealpha&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;127&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Completely fill the background of the new image with allocated color.      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagefill&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$color&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// Restore transparency blending      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagesavealpha&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;    if( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$zoom_crop &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_w &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_h &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width  &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// calculate x or y coordinate and width or height of source      &lt;br /&gt;     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_w &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;round&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) );      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;round&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;- ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) ) / &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;        } elseif ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_h &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;round&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) );      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;round&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;- ( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;/ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_y &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cmp_x &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) ) / &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;        }      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecopyresampled&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_x&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_y&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_w&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src_h &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;    } else {      &lt;br /&gt;     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// copy and resize part of an image with resampling      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecopyresampled&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$new_height&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$width&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$height &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filters &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// apply filters to image      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterList &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;explode&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"|"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterList       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fl&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;explode&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;","&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fl&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            if(isset(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]])) {      &lt;br /&gt;           &lt;br /&gt;                for(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;lt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;++) {      &lt;br /&gt;                    if(!isset(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;])) {      &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;                    }      &lt;br /&gt;                }      &lt;br /&gt;               &lt;br /&gt;                switch(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]][&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]) {      &lt;br /&gt;               &lt;br /&gt;                    case &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;:      &lt;br /&gt;                   &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagefilter&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]][&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;], &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;                        break;      &lt;br /&gt;                   &lt;br /&gt;                    case &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;:      &lt;br /&gt;                   &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagefilter&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]][&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;], &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;], &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;                        break;      &lt;br /&gt;                   &lt;br /&gt;                    case &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;:      &lt;br /&gt;                   &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagefilter&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]][&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;], &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;], &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;], &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;                        break;      &lt;br /&gt;                   &lt;br /&gt;                    default:      &lt;br /&gt;                   &lt;br /&gt;                        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagefilter&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$imageFilters&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$filterSettings&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]][&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;                        break;      &lt;br /&gt;                       &lt;br /&gt;                }      &lt;br /&gt;            }      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// output image to browser based on mime type      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;show_image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// remove image from memory      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagedestroy&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$canvas&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;} else {      &lt;br /&gt;     &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"image " &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;" not found"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    } else {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"no source specified"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;show_image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image_resized&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    global &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$quality&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// check to see if we can write to the cache directory      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$is_writable &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file_name &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;     &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;touch&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// give 666 permissions so that the developer&lt;br /&gt;        // can overwrite web server user      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;chmod&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0666&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$is_writable &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;       &lt;br /&gt;    } else {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file_name &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;NULL&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'Content-type: ' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$quality &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;floor&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$quality &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0.09&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagepng&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image_resized&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file_name&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$quality&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$is_writable&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;show_cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagedestroy&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image_resized&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"error showing image"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_request&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$property&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$default &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;   &lt;br /&gt;    if( isset(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_REQUEST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$property&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]) ) {      &lt;br /&gt;   &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_REQUEST&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$property&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;       &lt;br /&gt;    } else {      &lt;br /&gt;   &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$default&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;       &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;open_image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stristr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'gif'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;   &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecreatefromgif&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;    } elseif(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stristr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'jpeg'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;   &lt;br /&gt;        @&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;ini_set&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'gd.jpeg_ignore_warning'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecreatefromjpeg&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;    } elseif( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stristr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'png'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;   &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;imagecreatefrompng&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$image&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;* clean out old files from the cache      &lt;br /&gt;* you can change the number of files to store and to delete per loop in the defines at the top of the code      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;cleanCache&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;() {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$files &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;glob&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"cache/*"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;GLOB_BRACE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$yesterday &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;time&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;() - (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;24 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;60 &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;* &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;60&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;count&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$files&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;usort&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$files&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"filemtime_compare"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;       &lt;br /&gt;        if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;count&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$files&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;CACHE_SIZE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;           &lt;br /&gt;            foreach (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$files       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;               &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;++;      &lt;br /&gt;               &lt;br /&gt;                if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$i &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;&amp;gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;CACHE_CLEAR&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;                    return;      &lt;br /&gt;                }      &lt;br /&gt;               &lt;br /&gt;                if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filemtime&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$yesterday&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;                    return;      &lt;br /&gt;                }      &lt;br /&gt;               &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;unlink&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;               &lt;br /&gt;            }      &lt;br /&gt;           &lt;br /&gt;        }      &lt;br /&gt;       &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;* compare the file time of two files      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filemtime_compare&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$a&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$b&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filemtime&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$a&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) - &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filemtime&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$b&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;* determine the file mime type      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stristr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;PHP_OS&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'WIN'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$os &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'WIN'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    } else {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$os &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;PHP_OS&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;function_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'mime_content_type'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mime_content_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// use PECL fileinfo to determine mime type      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if (!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;valid_src_mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;function_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'finfo_open'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$finfo &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;finfo_open&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;FILEINFO_MIME&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;finfo_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$finfo&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;finfo_close&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$finfo&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// try to determine mime type by using unix file command      &lt;br /&gt;    // this should not be executed on windows      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if (!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;valid_src_mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$os &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"WIN"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_match&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/FREEBSD|LINUX/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$os&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;trim&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(@&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;shell_exec&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'file -bi "' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'"'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// use file's extension to determine mime type      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if (!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;valid_src_mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// set defaults      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'image/png'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// file details      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fileDetails &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;pathinfo&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ext &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strtolower&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fileDetails&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"extension"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// mime types      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$types &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= array(      &lt;br /&gt;             &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'jpg'  &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'image/jpeg'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;             &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'jpeg' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'image/jpeg'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;             &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'png'  &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'image/png'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;             &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'gif'  &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;=&amp;gt; &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'image/gif'      &lt;br /&gt;         &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;        if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ext&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$types&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ext&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;])) {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$types&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ext&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;        }      &lt;br /&gt;       &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;valid_src_mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_match&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/jpg|jpeg|gif|png/i"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;check_cache&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// make sure cache dir exists      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if (!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// give 777 permissions so that developer can overwrite      &lt;br /&gt;        // files created by web server user      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;mkdir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;chmod&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0777&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;show_cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$mime_type&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;show_cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_dir &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;();      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$gmdate_mod &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;gmdate&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"D, d M Y H:i:s"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filemtime&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;       &lt;br /&gt;        if(! &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strstr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$gmdate_mod&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"GMT"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$gmdate_mod &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;.= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;" GMT"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        }      &lt;br /&gt;       &lt;br /&gt;        if (isset(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"HTTP_IF_MODIFIED_SINCE"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;])) {      &lt;br /&gt;       &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// check for updates      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$if_modified_since       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/;.*$/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"HTTP_IF_MODIFIED_SINCE"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;           &lt;br /&gt;            if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$if_modified_since       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;== &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$gmdate_mod&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"HTTP/1.1 304 Not Modified"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;                exit;      &lt;br /&gt;            }      &lt;br /&gt;     &lt;br /&gt;        }      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fileSize &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;filesize&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// send headers then display image      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Content-Type: image/png"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Accept-Ranges: bytes"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Last-Modified: " &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$gmdate_mod&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Content-Length: " &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$fileSize&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Cache-Control: max-age=9999, must-revalidate"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"Expires: " &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$gmdate_mod&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;readfile&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;       &lt;br /&gt;        exit;      &lt;br /&gt;     &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;() {      &lt;br /&gt;     &lt;br /&gt;    global &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$lastModified&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    static &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;   &lt;br /&gt;    if(!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cachename &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'QUERY_STRING'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] . &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;VERSION &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$lastModified&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;md5&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cachename&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'.png'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$cache_file&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;* check to if the url is valid or not      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;valid_extension &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ext&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_match&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/jpg|jpeg|png|gif/i"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$ext&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;TRUE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    } else {      &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;FALSE&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;* tidy up the image source url      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;cleanSource&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// remove slash from start of string      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strpos&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) == &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;substr&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, -(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;strlen&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) - &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;));      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// remove http/ https/ ftp      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/^((ht|f)tp(s|):\/\/)/i"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// remove domain name from the source url      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$host &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"HTTP_HOST"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;str_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$host&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$host &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;str_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"www."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$host&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;str_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$host&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// don't allow users the ability to use '../'&lt;br /&gt;    // in order to gain access to files below document root      &lt;br /&gt;     &lt;br /&gt;    // src should be specified relative to document root like:      &lt;br /&gt;    // src=images/img.jpg or src=/images/img.jpg      &lt;br /&gt;    // not like:      &lt;br /&gt;    // src=../images/img.jpg      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/\.\.+\//"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;//print_r($_SERVER);      &lt;br /&gt;   &lt;br /&gt;    // get path to image on file system      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_document_root&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;   &lt;br /&gt;     &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;*&lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;get_document_root &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// check for unix servers      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if(@&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'DOCUMENT_ROOT'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'DOCUMENT_ROOT'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;];      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// the relative paths below are useful if Thumbnail is moved outside of document root      &lt;br /&gt;    // specifically if installed in wordpress themes like mimbo pro:      &lt;br /&gt;    // /wp-content/themes/mimbopro/scripts/Thumbnail.php      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$paths &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= array(      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;".."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"../.."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"../../.."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"../../../.."&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;,      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"../../../../.."      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;    foreach(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$paths &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;        if(@&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)) {      &lt;br /&gt;            return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        }      &lt;br /&gt;    }      &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// special check for microsoft servers      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;if(!isset(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'DOCUMENT_ROOT'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;])) {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;str_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"/"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;"\\"&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'ORIG_PATH_INFO'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;str_replace&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'SCRIPT_FILENAME'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;       &lt;br /&gt;        if( @&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_exists&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'/' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) ) {      &lt;br /&gt;            return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$path&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        }      &lt;br /&gt;    }   &lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'file not found ' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$src&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;     &lt;br /&gt;}      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/**      &lt;br /&gt;* generic error message      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;displayError&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$errorString &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) {      &lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;header&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'HTTP/1.1 400 Bad Request'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;    die(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$errorString&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;);      &lt;br /&gt;   &lt;br /&gt;}      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-9091484482708993177?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/9091484482708993177/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=9091484482708993177" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/9091484482708993177?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/9091484482708993177?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/php-thumbnail-script-generate.html" title="PHP - Thumbnail script - Generate thumbnails on the fly." /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8BRXc4fSp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-4587981585198519049</id><published>2009-06-22T09:31:00.002+05:30</published><updated>2009-06-25T14:37:34.935+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:37:34.935+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="AppStore Ranking" /><title>Php - Get the AppStore Ranking for any iPhone App</title><content type="html">This function returns the overall ranking (in the US AppStore) for any iPhone App.&lt;br /&gt;&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right; background-color: rgb(226, 226, 226);"&gt;       &lt;script type="text/javascript"&gt;             &lt;!--             e9 = new Object();                e9.size = "336x280,300x250,300x600";             //--&gt;&lt;/script&gt;       &lt;script type="text/javascript" src="http://tags.expo9.exponential.com/tags/WeberDevcom/ROS/tags.js"&gt;&lt;/script&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;     &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;/*      &lt;br /&gt;$id = 9 digit number      &lt;br /&gt;     &lt;br /&gt;You can find the App ID on the URL to the AppStore, for example awesomefactsapp.com link is the following:      &lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=309526865&amp;amp;mt=8"&gt;http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=309526865&amp;amp;mt=8&lt;/a&gt;      &lt;br /&gt;     &lt;br /&gt;So in this case, the $id would be 309526865.      &lt;br /&gt;*/      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;function &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;AppStore&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$id&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;{      &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;file_get_contents&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'&lt;a class="moz-txt-link-freetext" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?id=25204&amp;amp;popId=30"&gt;http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?id=25204&amp;amp;popId=30&lt;/a&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;stream_context_create&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;json_decode&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'{"http":{"method":"GET","header":"X-Apple-Store-Front: 143441-1","user_agent":"iTunes\/4.2 (Macintosh; U; PPC Mac OS X 10.2)"}}'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;true&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)));      &lt;br /&gt;     &lt;br /&gt;    if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;preg_match_all&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'~&amp;gt;(\d+)\.&amp;lt;.*?viewSoftware\?id=(\d+)&amp;amp;.*?draggingName="(.*?)"~s'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;) &amp;gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;    {      &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;array_search&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$id&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;]);      &lt;br /&gt;     &lt;br /&gt;        if (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;!== &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;)      &lt;br /&gt;        {      &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;++;      &lt;br /&gt;     &lt;br /&gt;            echo &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'&amp;lt;h2&amp;gt;"'       &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$matches&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;][&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;- &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;] . &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;'" is ranked #' &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result &lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;. &lt;/span&gt;&lt;span style="color: rgb(221, 0, 0);"&gt;' overall in the US.&amp;lt;/h2&amp;gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;        }      &lt;br /&gt;     &lt;br /&gt;        return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;$result&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;    }      &lt;br /&gt;     &lt;br /&gt;    return &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;;      &lt;br /&gt;}      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Usage example:&lt;br /&gt;&lt;table width="100%" bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br /&gt;      &lt;/td&gt;     &lt;/tr&gt;     &lt;tr style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div style="position: relative; right: 0px; display: inline; float: right;"&gt;&lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt;       &lt;script language="javascript" src="http://media.fastclick.net/w/get.media?sid=17328&amp;amp;m=6&amp;amp;tp=8&amp;amp;d=j&amp;amp;t=n"&gt;&lt;/script&gt;       &lt;noscript&gt;&lt;a href="http://media.fastclick.net/w/click.here?sid=17328&amp;m=6&amp;c=1" target="_blank"&gt; &lt;img src="http://media.fastclick.net/w/get.media?sid=17328&amp;m=6&amp;tp=8&amp;d=s&amp;c=1" border="1" height="250" width="300" /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;!-- ValueClick Media 300x250 Medium Rectangle CODE for weberdev.com --&gt; &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;&amp;lt;?php      &lt;br /&gt;var_dump&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;AppStore&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;309526865&lt;/span&gt;&lt;span style="color: rgb(0, 119, 0);"&gt;))); &lt;/span&gt;&lt;span style="color: rgb(255, 128, 0);"&gt;// returns the rank or false if the App is not in the Top 100.      &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 187);"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-4587981585198519049?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/4587981585198519049/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=4587981585198519049" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/4587981585198519049?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/4587981585198519049?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/06/php-get-appstore-ranking-for-any-iphone.html" title="Php - Get the AppStore Ranking for any iPhone App" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;Ck8DQHo8eSp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-5341226345283048850</id><published>2009-04-07T11:09:00.001+05:30</published><updated>2009-06-25T14:37:51.471+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:37:51.471+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Detect Alphabet only string" /><title>php - Detect Alphabet only string with ctype_alpha</title><content type="html">&lt;h2&gt;Detect Alphabet only string with ctype_alpha&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;There are times when you need a function that can detect strings which contains onlyalphabetic characters. While &lt;a href="http://my2.php.net/manual/en/function.is-numeric.php"&gt;is_numeric&lt;/a&gt; can validate a given string contains numeric character, there are no is_* function variation exist which can do the same for alphabetic strings.&lt;/p&gt; &lt;p&gt;However, you can still test for alphabetic string using&lt;a href="http://my2.php.net/ctype_alpha"&gt; ctype_alpha() &lt;/a&gt;function. Example usage :&lt;/p&gt; &lt;span id="lcode-1"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(0, 51, 0);"&gt;if (ctype_alpha($testcase)) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 0);"&gt;             echo 'The string $testcase consists of all letters.\n';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 0);"&gt;         } else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 0);"&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 0);"&gt;                 echo 'The string $testcase does not consist of all letters.\n';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 0);"&gt;           }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 51, 0);"&gt;     }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-5341226345283048850?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/5341226345283048850/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=5341226345283048850" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5341226345283048850?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5341226345283048850?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/04/php-detect-alphabet-only-string-with.html" title="php - Detect Alphabet only string with ctype_alpha" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8MSX45eSp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-200037268498525717</id><published>2009-03-31T10:17:00.001+05:30</published><updated>2009-06-25T14:38:08.021+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:38:08.021+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PDF to MS Word" /><title>Convert your PDFs to MS Word</title><content type="html">&lt;p&gt;There are several well-regarded, free ways to take advantage of the Print function to transform just about any file to a PDF. &lt;a href="http://download.cnet.com/PrimoPDF/3000-10743_4-10264577.html"&gt;PrimoPDF&lt;/a&gt; and &lt;a href="http://download.cnet.com/doPDF-Free-PDF-Converter/3000-10743_4-10648880.html"&gt;doPDF&lt;/a&gt; sit at the top of the list, but what about reverse engineering that conversion? Converting in the other direction, from a PDF to a Microsoft Word-compatible format like DOC or RTF is trickier. &lt;/p&gt; &lt;p&gt;For one thing, there's a lot of crap out there. Many PDF-to-DOC converters have similar or even identical names, differentiated sometimes by nothing more than a cunning tap of the space bar. Many offer features that are hamstrung in various ways unless you pay for an upgrade, and just about all of them offer imperfect conversions. Even with these problems, though, you can get a reasonable conversion from the four programs and three Web-based services listed below. &lt;/p&gt; &lt;div class="cnet-image-div image-large float-none" style="width: 610px;"&gt;&lt;img class="cnet-image" src="cid:part1.06090503.06080001@gmail.com" alt="" width="610" height="378" /&gt; &lt;p class="image-caption"&gt;Sometimes right: Some PDF to Word Converter 1.5&lt;/p&gt; &lt;span class="image-credit"&gt;(Credit: Screenshot by Seth Rosenblatt/CNET)&lt;/span&gt;&lt;/div&gt; &lt;p&gt; &lt;a href="http://download.cnet.com/Some-PDF-to-Word-Converter/3000-2079_4-10836743.html"&gt;Some PDF to Word Converter 1.5&lt;/a&gt;: A basic but uncluttered interface introduces all of the program's conversion options in a sidebar on the right. Some handles batch conversions, converts outer fonts into text and embedded fonts into images, and supports both All Pages and page-range specific conversions. It can remove graphics on demand from the output document, which is always in the RTF format, and supports encryption. &lt;/p&gt; &lt;p&gt;The program suffers from two big drawbacks: the conversions aren't always the cleanest, with occasional image and text overlaps, and there's noticeable image deterioration. In place of drag-and-drop to add PDFs, you can add an entire folder via the folder icon. Some of the interface's option descriptions could be better phrased, too: "delete all graphics" with an option of "false" or "true" really could be posed better as "remove all graphics" and "yes" or "no." &lt;/p&gt; &lt;div class="cnet-image-div image-large float-none" style="width: 610px;"&gt;&lt;img class="cnet-image" src="cid:part2.08040902.08030300@gmail.com" alt="" width="610" height="414" /&gt; &lt;p class="image-caption"&gt;Free PDF to Word Doc Converter 1.1 makes you jump through hoops for a great end result.&lt;/p&gt; &lt;span class="image-credit"&gt;(Credit: Screenshot by Seth Rosenblatt/CNET)&lt;/span&gt;&lt;/div&gt; &lt;p&gt; &lt;a href="http://download.cnet.com/Free-PDF-To-Word-Doc-Converter/3000-2079_4-10792870.html"&gt;Free PDF to Word Doc Converter 1.1&lt;/a&gt; also gets a few things wrong, but eventually lands you the DOC output you want. Impressively, it offers one of the cleanest and most accurate free PDF-to-DOC conversions of the programs tested. You can change the output path and name, convert an entire document or just specific pages, and ditch images in the source PDF if need be. The final output will give you a pitch-perfect conversion. &lt;/p&gt; &lt;p&gt;From there, it goes a bit downhill. The option to open the output DOC in WordPad didn't function when we tested it, nor did the All Pages button. You can work around this by choosing Page Number instead of All Pages (Page Number defaults to the full page count), but it's still irritating. The other big frustration is that while the program is free, after five conversions you're asked to answer a math question a bit harder than the average Captcha. Batch conversion and encryption support are missing, too. If Free PDF to Word Doc Converter's bumpy ride didn't result in such a smooth landing, it wouldn't be worth touching. &lt;/p&gt; &lt;div class="cnet-image-div image-large float-none" style="width: 507px;"&gt;&lt;img class="cnet-image" src="cid:part3.08020407.02070503@gmail.com" alt="" width="507" height="543" /&gt; &lt;p class="image-caption"&gt;Free PDF to Word Converter 1.3: common name, common problems.&lt;/p&gt; &lt;span class="image-credit"&gt;(Credit: Screenshot by Seth Rosenblatt/CNET)&lt;/span&gt;&lt;/div&gt; &lt;p&gt; &lt;a href="http://download.cnet.com/Free-PDF-to-Word-Converter/3000-2079_4-10849566.html"&gt;Free PDF to Word Converter 1.3&lt;/a&gt; shares many things in common with its competitors besides a similar name: there's an imperfect balance of useful features and a perfect output. What's wrong: there's no drag-and-drop support, and you should be prepared for some minor yet annoying formatting errors, with occasional and minor word and image overlap. &lt;/p&gt; &lt;p&gt;What's right: The program can batch convert PDFs without being restricted to specific folders, can change your output destination, and put out either RTF or DOC. There's support for high levels of security, with space to provide passwords from the PDF owner and the PDF user. You can remove graphics on conversion and micro-manage the spaces between words and text boxes. It's fine for image-free PDFs, but somewhat less than exact with others. &lt;/p&gt; &lt;div class="cnet-image-div image-large float-none" style="width: 610px;"&gt;&lt;img class="cnet-image" src="cid:part4.09010106.08020508@gmail.com" alt="" width="610" height="522" /&gt; &lt;p class="image-caption"&gt;Advanced PDF to Word Converter Free 5.0: nearly-perfect output.&lt;/p&gt; &lt;span class="image-credit"&gt;(Credit: Screenshot by Seth Rosenblatt/CNET)&lt;/span&gt;&lt;/div&gt; &lt;p&gt; &lt;a href="http://download.cnet.com/Advanced-Pdf-to-Word-Converter-Free/3000-10743_4-10900586.html"&gt;Advanced PDF to Word Converter Free 5.0&lt;/a&gt; nearly crashes and burns on takeoff, but surprisingly leaves you with a nearly-perfect document. It will ask you to reboot on installation, which makes sense for programs that have deep hooks in your operating system but is a clarion warning for such a simple converter. However, as with all these converters, it's the final output that counts the most, and this program's final DOC output looks pretty good. &lt;/p&gt; &lt;p&gt;There's no support for encrypted PDFs, and when you convert or close the program, there's a nag screen to get you upgrade. Batch conversion, RTF and TXT output, and image deletion are restricted to the paid upgrade. The program does offer drag-and-drop additions, adding an entire folder, and user-selected output folders and output renaming. OpenOffice.org users will appreciate that this converter puts out a DOC that OpenOffice Writer can cleanly read images from--unlike many of the others. The biggest problem, of course, is that there is still some image quality degradation and minor text alignment problems. &lt;/p&gt; &lt;p&gt;OpenOffice users should take note that during these tests, I found that the OpenOffice Writer doesn't always play nicely with Rich Text Formatting. There are several free online conversion options as well, and they tend to have better output than the desktop programs. &lt;/p&gt; &lt;p&gt;You can send your PDF as an attachment to Adobe, and within a few minutes they'll send you back either a plain text TXT or HTML file. The service is basic but extremely fast. As long as you don't mind the lack of frills, you can e-mail &lt;a href="mailto:pdf2txt@adobe.com"&gt;pdf2txt@adobe.com&lt;/a&gt; for the plain text conversion and &lt;a href="mailto:pdf2html@adobe.com"&gt;pdf2html@adobe.com&lt;/a&gt; for HTML output, although the HTML service wasn't working when I tested it. More details are &lt;a href="http://www.adobe.com/products/acrobat/access_onlinetools.html"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;div class="cnet-image-div image-large float-none" style="width: 610px;"&gt;&lt;img class="cnet-image" src="cid:part5.09080008.07080502@gmail.com" alt="" width="610" height="326" /&gt; &lt;p class="image-caption"&gt;PDF to Word, from Nitro PDF.&lt;/p&gt; &lt;span class="image-credit"&gt;(Credit: Screenshot by Seth Rosenblatt/CNET)&lt;/span&gt;&lt;/div&gt; &lt;p&gt; &lt;a href="http://download.cnet.com/windows/nitro%20pdf%20software/3260-20_4-6262097.html"&gt;Nitro PDF&lt;/a&gt;, the makers of PrimoPDF, offer a glossy interface for their online &lt;a href="http://www.pdftoword.com/default.aspx"&gt;PDF to Word&lt;/a&gt; format converter. Clearly delineated instructions guide you through uploading your PDF, choosing an output format--either DOC or RTF--and entering your e-mail address. The conversion took a bit longer than Adobe's, but it's worth the wait. The conversion output is a perfect document, precisely the kind of painless process that most of the downloadable options lack. There's no support for encryption, nor for batches, but Nitro's service gets high marks for its precise and fast conversion. Apparently, there are &lt;a href="http://www.freewaregenius.com/2009/02/24/pdf-to-word-free-a-web-service-that-delivers-free-high-quality-pdf-to-doc-conversions/#comment-237848"&gt;plans to incorporate&lt;/a&gt; the PDF-to-Word feature in future editions of Nitro PDF. &lt;/p&gt; &lt;p&gt;There are two other PDF-to-Word services worth mentioning: Koolwire and Zamzar. &lt;a href="http://www.koolwire.com/Default.aspx"&gt;Koolwire&lt;/a&gt; will convert PDFs up to 10MB, but it can also handle DOC, XLS, PPT, VSD, MPP, RTF, TXT, JPEG, GIF, PNG, and MS Office 2007 formats like DOCX. Unlike the other services, clicking on their Web site opens an e-mail to which you only need to attach your PDF and then hit Send. The PDF comes out as RTF, with very minor image degradation and no formatting problems. &lt;/p&gt; &lt;div class="cnet-image-div image-large float-none" style="width: 610px;"&gt;&lt;img class="cnet-image" src="cid:part6.04020208.06000804@gmail.com" alt="" width="610" height="251" /&gt; &lt;p class="image-caption"&gt;Zamzar's uploading interface.&lt;/p&gt; &lt;span class="image-credit"&gt;(Credit: Screenshot by Seth Rosenblatt/CNET)&lt;/span&gt;&lt;/div&gt; &lt;p&gt; &lt;a href="http://www.zamzar.com/"&gt;Zamzar&lt;/a&gt; will convert PDFs up to 100MB at a time, and in addition to converting your PDF into DOC or RTF, it can output ODT, TXT, PS, and PNG. It can handle batch conversion, as long as you don't mind uploading the files one at a time. When it finishes converting, you receive a link that stays active for 24 hours from which you can download your converted files one at a time or all at once in a ZIP. There was minor image degradation, similar to what Koolwire spit out, and one instance of a formatting error. &lt;/p&gt; &lt;p&gt;Overall, there is no option that can be declared 100 percent perfect. Where one service--whether it's online or desktop--fails, it also tends to offer a better interface, or more conversion options than others. The reverse also seems to hold true, where the best conversions are not always buttressed by the greatest of user experiences. Nitro PDF's &lt;a href="http://www.pdftoword.com/default.aspx"&gt;PDF-to-Word&lt;/a&gt; Web site wins for its output and usability, but if you must go with a desktop client I'd choose &lt;a href="http://download.cnet.com/Free-PDF-To-Word-Doc-Converter/3000-2079_4-10792870.html"&gt;Free PDF to Word Doc Converter 1.1&lt;/a&gt; for the resulting document only. If you don't mind minor hiccups, but need a better user experience or more conversion options, &lt;a href="http://www.zamzar.com/"&gt;Zamzar&lt;/a&gt; and &lt;a href="http://download.cnet.com/Free-PDF-to-Word-Converter/3000-2079_4-10849566.html"&gt;Free PDF to Word Converter 1.3&lt;/a&gt; are probably what you need. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-200037268498525717?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/200037268498525717/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=200037268498525717" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/200037268498525717?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/200037268498525717?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/03/convert-your-pdfs-to-ms-word.html" title="Convert your PDFs to MS Word" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4EQnY5eSp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-2110276364437216390</id><published>2009-03-25T13:06:00.002+05:30</published><updated>2009-06-25T14:38:23.821+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:38:23.821+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="redirect page" /><title>PHP - redirect page</title><content type="html">&lt;strong&gt;In this tutorial I will show you how to redirect pages in PHP. You can find all important aspects and code examples about PHP redirecting.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;To make a redirection you can use the &lt;span style="font-weight: bold;"&gt;header()&lt;/span&gt; function. This function send a raw HTTP header to the browser. As result the browser will be redirected to the page defined in this new HTTP header. You only have to take care that &lt;strong&gt;header()&lt;/strong&gt; must be called before any actual output is sent. It means you can not use and html tags, echo or print functions. Below is an example how to use redirection in PHP:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;    &amp;lt;?php&lt;br /&gt;&lt;br /&gt;            header('Location:&lt;a class="moz-txt-link-freetext" href="http://phpcodetutorials.blogspot.com/"&gt;http://phpcodetutorials.blogspot.com&lt;/a&gt;');&lt;br /&gt;&lt;br /&gt;    ?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The only thing you have to do is to change the URL inside the header parameter.&lt;br /&gt;&lt;br /&gt;However if you write the echo before the redirection you will get an error like this:&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;Warning&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:Courier New;"&gt;: Cannot modify header information - headers already sent by&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To avoid this problem you can use PHP output buffering as follows:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;      &lt;span style="color:#3333ff;"&gt;&amp;lt;?php&lt;br /&gt; &lt;br /&gt;      ob_start();&lt;br /&gt;  &lt;br /&gt;      echo "Test";&lt;br /&gt; &lt;br /&gt;      header("Location: &lt;a class="moz-txt-link-freetext" href="http://www.php.net/"&gt;http://www.php.net&lt;/a&gt;");&lt;br /&gt;  &lt;br /&gt;      ob_flush();&lt;br /&gt;  &lt;br /&gt;      ?&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-2110276364437216390?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/2110276364437216390/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=2110276364437216390" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/2110276364437216390?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/2110276364437216390?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/03/php-redirect-page.html" title="PHP - redirect page" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0YMR3o-fSp7ImA9WxVUEko.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-2086309951660320343</id><published>2009-03-17T11:34:00.002+05:30</published><updated>2009-03-17T11:56:26.455+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-17T11:56:26.455+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Regular Expression" /><title>php- Regular Expressions  simple functions and common reqular expressions</title><content type="html">&lt;div class="moz-signature"&gt; &lt;p style="color: blue;"&gt;&lt;b&gt;&lt;big&gt;Regular Expressions&lt;/big&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="color: blue; font-family: times new roman;"&gt;&lt;span style="font-size:100%;"&gt;We will use simple functions which return TRUE or FALSE.&lt;br /&gt;$regex will serve as our regular expression to match against and $text will be our text.&lt;/span&gt;&lt;/p&gt; &lt;pre&gt; &lt;/pre&gt; &lt;table width="465" border="2" cellpadding="2" cellspacing="2" height="226"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;       &lt;pre&gt;&lt;big&gt;&lt;big&gt;&lt;small&gt;&lt;br /&gt;function do_reg($text, $regex)&lt;br /&gt;{  &lt;br /&gt;  if (preg_match($regex, $text))&lt;br /&gt;  {   &lt;br /&gt;      return TRUE;  &lt;br /&gt;  }   &lt;br /&gt;  else {   &lt;br /&gt;        return FALSE;  &lt;br /&gt;      }&lt;br /&gt;}&lt;/small&gt;&lt;/big&gt;&lt;/big&gt;&lt;/pre&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;pre&gt;&lt;big&gt;&lt;b&gt;&lt;/b&gt;&lt;/big&gt; &lt;/pre&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:#3333ff;"&gt;The next function will get the part of a given string ($text) matched&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:#3333ff;"&gt;by the regex ($regex) using a group srorage ($regs). By changing the&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:#3333ff;"&gt;$regs[0] to $regs[1] we can use a capturing group (in this case griup&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:#3333ff;"&gt;1) to match against. The capturing group can also have a name&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:#3333ff;"&gt;($regs['groupname']):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;pre&gt; &lt;/pre&gt; &lt;table width="513" border="2" cellpadding="2" cellspacing="2" height="245"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;       &lt;pre&gt;&lt;big&gt;&lt;br /&gt;function do_reg($text, $regex, $regs) {  &lt;br /&gt;&lt;br /&gt;if (preg_match($regex, $text, $regs))&lt;br /&gt;{   &lt;br /&gt;    $result = $regs[0];  &lt;br /&gt;}   &lt;br /&gt;else {&lt;br /&gt;  &lt;br /&gt;   $result = "";  &lt;br /&gt;&lt;br /&gt;   }  &lt;br /&gt;&lt;br /&gt; return $result;&lt;br /&gt;&lt;br /&gt; }&lt;/big&gt;&lt;/pre&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;pre&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;big&gt;The following function will return an array of all regex&lt;br /&gt; matches in a given string ($text):    &lt;/big&gt;&lt;/span&gt;  &lt;/pre&gt; &lt;table style="width: 485px; height: 144px;" border="2" cellpadding="2" cellspacing="2"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;       &lt;pre&gt;&lt;big&gt;function do_reg($text, $regex)&lt;br /&gt;{  &lt;br /&gt; preg_match_all($regex, $text, $result, PREG_PATTERN_ORDER);&lt;br /&gt; &lt;br /&gt; return $result = $result[0];&lt;br /&gt;&lt;br /&gt;}&lt;/big&gt;&lt;/pre&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;pre&gt; &lt;big&gt;&lt;span style="color:#3333ff;"&gt;Next we can iterate (loop) over all matches in a string ($text)&lt;br /&gt;and output the results:   &lt;/span&gt;&lt;/big&gt;&lt;/pre&gt; &lt;table width="549" border="2" cellpadding="2" cellspacing="2" height="131"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;       &lt;pre&gt;&lt;big&gt;&lt;br /&gt;function do_reg($text, $regex)&lt;br /&gt;{  &lt;br /&gt;&lt;br /&gt;preg_match_all($regex, $text, $result, PREG_PATTERN_ORDER); &lt;br /&gt;&lt;br /&gt;for ($i = 0; $i &amp;lt; count($result[0]); $i++)&lt;br /&gt;{  &lt;br /&gt;  $result[0][$i];&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;} &lt;/big&gt;        &lt;/pre&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;pre&gt; &lt;big&gt;&lt;span style="color:#3333ff;"&gt;Extending the above one we can iterate over all matches ($text)&lt;br /&gt;&lt;span style="font-size:130%;"&gt;and capture groups in a string ($text):  &lt;/span&gt;&lt;/span&gt;&lt;/big&gt;&lt;/pre&gt; &lt;table style="width: 519px; height: 206px;" border="2" cellpadding="2" cellspacing="2"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;       &lt;pre&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;function do_reg($text, $regex)&lt;br /&gt;{  &lt;br /&gt;preg_match_all($regex, $text, $result, PREG_SET_ORDER);&lt;br /&gt;&lt;br /&gt;for ($matchi = 0; $matchi &amp;lt; count($result); $matchi++)&lt;br /&gt; {   &lt;br /&gt;  for ($backrefi = 0; $backrefi &amp;lt; count($result[$matchi]); $backrefi++)&lt;br /&gt;  {   &lt;br /&gt;     $result[$matchi][$backrefi];  &lt;br /&gt;  } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;pre&gt;&lt;big&gt;&lt;span style="color:#3333ff;"&gt; Now lets see some useful regular expressions&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;big&gt;&lt;big&gt;Addresses  &lt;/big&gt;&lt;/big&gt;&lt;/u&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;//Address: State code (US) '/\\b(?:A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])\\b/'  //Address: ZIP code (US) '\b[0-9]{5}(?:-[0-9]{4})?\b'  &lt;/span&gt;&lt;b&gt;&lt;big&gt;&lt;big&gt;&lt;span style="color:#3333ff;"&gt;&lt;u&gt;Dates&lt;/u&gt;&lt;/span&gt;&lt;/big&gt;&lt;/big&gt;&lt;/b&gt;&lt;/big&gt;&lt;/pre&gt; &lt;span style="color:#3333ff;"&gt;//Date d/m/yy and dd/mm/yyyy&lt;br /&gt;//1/1/00 through 31/12/99 and 01/01/1900 through 31/12/2099&lt;br /&gt;//Matches invalid dates such as February 31st '\b(0?[1-9]|[12][0-9]|3[01])[- /.](0?[1-9]|1[012])[- /.](19|20)?[0-9]{2}\b'&lt;br /&gt;&lt;br /&gt;//Date dd/mm/yyyy //01/01/1900 through 31/12/2099&lt;br /&gt;//Matches invalid dates such as February 31st '(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)[0-9]{2}'&lt;br /&gt;&lt;br /&gt;//Date m/d/y and mm/dd/yyyy //1/1/99 through 12/31/99 and 01/01/1900 through 12/31/2099&lt;br /&gt; //Matches invalid dates such as February 31st //Accepts dashes, spaces, forward slashes and dots as date separators '\b(0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2}\b'&lt;br /&gt;&lt;br /&gt;//Date mm/dd/yyyy //01/01/1900 through 12/31/2099&lt;br /&gt; //Matches invalid dates such as February 31st '(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)[0-9]{2}'&lt;br /&gt;&lt;br /&gt;//Date yy-m-d or yyyy-mm-dd //00-1-1 through 99-12-31 and 1900-01-01 through 2099-12-31&lt;br /&gt; //Matches invalid dates such as February 31st '\b(19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])\b'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Date yyyy-mm-dd //1900-01-01 through 2099-12-31&lt;br /&gt; //Matches invalid dates such as February 31st '(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])'&lt;/span&gt; &lt;pre&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="font-size:180%;"&gt;&lt;b&gt;&lt;u&gt;Email address &lt;br /&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;big&gt;//Email address //Use this version to seek out email addresses in random documents and texts.&lt;br /&gt; //Does not match email addresses using an IP address instead of a domain name.&lt;br /&gt; //Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum. &lt;br /&gt;//Including these increases the risk of false positives when applying the regex to random documents. '\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b'&lt;br /&gt;//Email address (anchored)&lt;br /&gt;//Use this anchored version to check if a valid email address was entered. //Does not match email addresses using an IP address instead of a domain name.&lt;br /&gt;//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.&lt;br /&gt;//Requires the "case insensitive" option to be ON. '^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$'&lt;br /&gt;//Email address (anchored; no consecutive dots)&lt;br /&gt;//Use this anchored version to check if a valid email address was entered. //Improves on the original email address regex by excluding addresses with consecutive dots such as &lt;a class="moz-txt-link-abbreviated" href="mailto:john@aol...com"&gt;john@aol...com&lt;/a&gt;&lt;br /&gt; //Does not match email addresses using an IP address instead of a domain name.&lt;br /&gt;//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.   //Including these increases the risk of false positives when applying the regex to random documents. '^[A-Z0-9._%-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}$'  //Email address (no consecutive dots)&lt;br /&gt;//Use this version to seek out email addresses in random documents and texts.&lt;br /&gt;//Improves on the original email address regex by excluding addresses with consecutive dots such as &lt;a class="moz-txt-link-abbreviated" href="mailto:john@aol...com"&gt;john@aol...com&lt;/a&gt; //Does not match email addresses using an IP address instead of a domain name.&lt;br /&gt;//Does not match email addresses on new-fangled top-level domains with more than 4 letters such as .museum.  &lt;br /&gt;//Including these increases the risk of false positives when applying the regex to random documents. '\b[A-Z0-9._%-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}\b'&lt;br /&gt;//Email address (specific TLDs) //Does not match email addresses using an IP address instead of a domain name. //Matches all country code top level domains, and specific common top level domains.&lt;br /&gt; '^[A-Z0-9._%-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|biz|info|name|aero|biz|info|jobs|museum|name)$' &lt;br /&gt;//Email address: Replace with HTML link '\b(?:mailto:)?([A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4})\b'&lt;br /&gt;&lt;br /&gt;&lt;/big&gt;&lt;b&gt;&lt;big&gt;&lt;big&gt;&lt;big&gt;&lt;u&gt;URL's&lt;/u&gt;&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;big&gt;&lt;span style="color:#3333ff;"&gt;//URL: Different URL parts //Protocol, domain name, page and CGI parameters are captured into backreferenes 1 through 4 '\b((?#protocol)https?|ftp)://((?#domain)[-A-Z0-9.]+)((?#file)/[-A-Z0-9+&amp;amp;@#/%=~_|!:,.;]*)?((?#parameters)\?[-A-Z0-9+&amp;amp;@#/%=~_|!:,.;]*)?' &lt;br /&gt;//URL: Different URL parts //Protocol, domain name, page and CGI parameters are captured into named capturing groups.&lt;br /&gt;//Works as it is with .NET, and after conversion by RegexBuddy on the Use page with Python, PHP/preg and PCRE. '\b(?&amp;lt;protocol&amp;gt;https?|ftp)://(?&amp;lt;domain&amp;gt;[-A-Z0-9.]+)(?&amp;lt;file&amp;gt;/[-A-Z0-9+&amp;amp;@#/%=~_|!:,.;]*)?(?&amp;lt;parameters&amp;gt;\?[-A-Z0-9+&amp;amp;@#/%=~_|!:,.;]*)?' &lt;br /&gt;//URL: Find in full text //The final character class makes sure that if an URL is part of some text, punctuation such as a  //comma or full stop after the URL is not interpreted as part of the URL. '\b(https?|ftp|file)://[-A-Z0-9+&amp;amp;@#/%?=~_|!:,.;]*[-A-Z0-9+&amp;amp;@#/%=~_|]' &lt;br /&gt;//URL: Replace URLs with HTML links preg_replace('\b(https?|ftp|file)://[-A-Z0-9+&amp;amp;@#/%?=~_|!:,.;]*[-A-Z0-9+&amp;amp;@#/%=~_|]', '&amp;lt;a href="\0"&amp;gt;\0&amp;lt;/a&amp;gt;', $text);         &lt;/span&gt;&lt;/big&gt;&lt;/pre&gt; &lt;p style="color: blue;"&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-2086309951660320343?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/2086309951660320343/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=2086309951660320343" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/2086309951660320343?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/2086309951660320343?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/03/php-regular-expressions-simple.html" title="php- Regular Expressions  simple functions and common reqular expressions" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4FRnwycCp7ImA9WxJWGU8.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-1955788811768688287</id><published>2009-02-18T16:43:00.002+05:30</published><updated>2009-06-25T14:38:37.298+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-25T14:38:37.298+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Add New MySQL User" /><title>Mysql - Add New MySQL User - PHP MySQL Tutorial</title><content type="html">Add New MySQL User - PHP MySQL Tutorial&lt;br /&gt;&lt;br /&gt;&lt;h2 class="CommonContentBoxHeaderSmall NoPrint"&gt;&lt;span&gt;Add New MySQL User&lt;/span&gt;                                                                                                &lt;/h2&gt;                                                                   &lt;div&gt;&lt;p&gt;For adding a new user to MySQL you just need to add a new entry to user      table in database &lt;span class="courier"&gt;mysql&lt;/span&gt;. Below is an example of adding new user &lt;span class="courier"&gt;phpcake&lt;/span&gt;      with SELECT, INSERT and UPDATE privileges with the password &lt;span class="courier"&gt;      mypass &lt;/span&gt; the SQL query is :&lt;/p&gt; &lt;div class="codebox"&gt;mysql&gt; &lt;strong&gt;use mysql;&lt;/strong&gt;&lt;br /&gt;Database changed &lt;p&gt;mysql&gt; INSERT INTO user (host, user, password, select_priv, insert_priv,       update_priv) VALUES ('localhost', 'phpcake', &lt;strong&gt;PASSWORD('mypass')&lt;/strong&gt;,       'Y', 'Y', 'Y');&lt;br /&gt;Query OK, 1 row affected (0.20 sec)&lt;/p&gt; &lt;p&gt;mysql&gt; &lt;strong&gt;FLUSH PRIVILEGES;&lt;/strong&gt;&lt;br /&gt;Query OK, 1 row affected (0.01 sec) &lt;/p&gt; &lt;p&gt;mysql&gt; SELECT host, user, password FROM user WHERE user = 'phpcake';&lt;br /&gt;+-----------+---------+------------------+&lt;br /&gt;| host      | user    | password               |&lt;br /&gt;+-----------+---------+------------------+&lt;br /&gt;| localhost | phpcake | &lt;strong&gt;6f8c114b58f2ce9e&lt;/strong&gt; |&lt;br /&gt;+-----------+---------+------------------+&lt;br /&gt;1 row in set (0.00 sec)&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;/div&gt; &lt;p&gt;When adding a new user remember to encrypt the new password using PASSWORD()      function provided by MySQL. As you can see in the above example the password      &lt;span class="courier"&gt;mypass&lt;/span&gt; is encrypted to &lt;span class="courier"&gt;6f8c114b58f2ce9e.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Notice the the &lt;span class="courier"&gt;FLUSH PRIVILEGES&lt;/span&gt; statement.      This tells the server to reload the grant tables. If you don't use it then      you won't be able to connect to mysql using the new user account (at least      until the server is reloaded).&lt;/p&gt; &lt;p&gt;You can also specify other privileges to a new user by setting the values      of these columns in &lt;span class="courier"&gt;user&lt;/span&gt; table to 'Y' when executing      the INSERT query :&lt;/p&gt; &lt;ul&gt;&lt;li&gt; Select_priv &lt;/li&gt;&lt;li&gt; Insert_priv &lt;/li&gt;&lt;li&gt; Update_priv &lt;/li&gt;&lt;li&gt; Delete_priv &lt;/li&gt;&lt;li&gt; Create_priv &lt;/li&gt;&lt;li&gt; Drop_priv &lt;/li&gt;&lt;li&gt;Reload_priv&lt;/li&gt;&lt;li&gt; Shutdown_priv &lt;/li&gt;&lt;li&gt;Process_priv &lt;/li&gt;&lt;li&gt;File_priv &lt;/li&gt;&lt;li&gt;Grant_priv &lt;/li&gt;&lt;li&gt;References_priv&lt;/li&gt;&lt;li&gt; Index_priv&lt;/li&gt;&lt;li&gt; Alter_priv &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-1955788811768688287?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/1955788811768688287/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=1955788811768688287" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/1955788811768688287?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/1955788811768688287?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/02/mysql-add-new-mysql-user-php-mysql.html" title="Mysql - Add New MySQL User - PHP MySQL Tutorial" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUEGQn04eip7ImA9WxVXEUo.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-2328859650351124574</id><published>2009-02-09T15:30:00.001+05:30</published><updated>2009-02-09T15:30:23.332+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-09T15:30:23.332+05:30</app:edited><title>Php - File writer class - write files and take its backups so that it can be easily reverted</title><content type="html">File Writer is a simple class designed to make writing files, or appending to files, much easier. It also has optional functionality to take backups of files it writes to so that changes can be reverted easily.&lt;br&gt; &lt;br&gt; Usage: Example&lt;br&gt; &lt;br&gt; &lt;table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0"  height="326" width="1418"&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr  style="border-style: solid; border-color: rgb(200, 200, 200); border-width: 0px 1px; padding: 6px;"&gt;       &lt;td&gt;       &lt;div  style="position: relative; right: 0px; display: inline; float: right;"&gt;       &lt;script type="text/javascript"&gt; 												&lt;!-- 												e9 = new Object(); 											    e9.size = "336x280,300x250,300x600"; 												//--&gt;&lt;/script&gt;       &lt;script type="text/javascript"  src="http://tags.expo9.exponential.com/tags/WeberDevcom/ROS/tags.js"&gt;&lt;/script&gt;       &lt;/div&gt;       &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span  style="color: rgb(0, 0, 204);"&gt;&amp;lt;?PHP       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;//Include the main class file       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;include(&lt;/span&gt;&lt;span  style="color: rgb(204, 0, 0);"&gt;"main.php"&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;);       &lt;br&gt;       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;//Create a new file_writer object       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;$file &lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;= new &lt;/span&gt;&lt;span  style="color: rgb(0, 0, 204);"&gt;file_writer&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;;       &lt;br&gt;       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;//Write to a new file       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;$file&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 204);"&gt;write&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(204, 0, 0);"&gt;"test.txt"&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(204, 0, 0);"&gt;"Test Test Test"&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;);       &lt;br&gt;       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(255, 153, 0);"&gt;//Append more text to the file       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;$file&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;-&amp;gt;&lt;/span&gt;&lt;span  style="color: rgb(0, 0, 204);"&gt;append&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;(&lt;/span&gt;&lt;span  style="color: rgb(204, 0, 0);"&gt;"test.txt"&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;, &lt;/span&gt;&lt;span  style="color: rgb(204, 0, 0);"&gt;"\r\nTest Test Test"&lt;/span&gt;&lt;span  style="color: rgb(0, 102, 0);"&gt;);       &lt;br&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;?&amp;gt;&lt;br&gt;       &lt;br&gt;       &lt;/span&gt; &lt;/span&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;main.php&lt;br&gt;       &lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;&amp;lt;?PHP &lt;br&gt; //Should file_writer take backups of files &lt;br&gt; define("WRITER_BACKUP", TRUE); &lt;br&gt; &amp;nbsp;&lt;br&gt; //Where should file_writer store backups &lt;br&gt; define("WRITER_RESTORE_DIR", "./restore"); &lt;br&gt; &amp;nbsp;&lt;br&gt; //Should file_writer lock files while writing to them &lt;br&gt; define("WRITER_LOCK_FILES", TRUE); &lt;br&gt; &amp;nbsp;&lt;br&gt; class file_writer &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; public $files = array(); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; function __construct() &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; function write($file, $content) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $date = date("d-m-Y_his"); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Copy the original file to the restore dir &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(file_exists($file)) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(WRITER_BACKUP) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; copy($file, WRITER_RESTORE_DIR."/".$date."_".$file); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!isset($files[$file])) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Make the file handle &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $files[$file] = fopen($file, "w"); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(WRITER_LOCK_FILES) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flock($files[$file], LOCK_EX); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Overwrite the file &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fwrite($files[$file], $content); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; function append($file, $content) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $date = date("d-m-Y_his"); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Copy the original file to the restore dir &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(file_exists($file)) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(WRITER_BACKUP) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; copy($file, WRITER_RESTORE_DIR."/".$date."_".$file); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!isset($files[$file])) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Make the file handle &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $files[$file] = fopen($file, "a"); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(WRITER_LOCK_FILES) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flock($files[$file], LOCK_EX); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Overwrite the file &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fwrite($files[$file], $content); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; function __destruct() &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($this-&amp;gt;files as $file) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose($file); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(WRITER_LOCK_FILES) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach($this-&amp;gt;files as $file) &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flock($file, LOCK_EX); &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt; &amp;nbsp;&lt;br&gt; ?&amp;gt; &lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;&lt;br&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-2328859650351124574?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/2328859650351124574/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=2328859650351124574" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/2328859650351124574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/2328859650351124574?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/02/php-file-writer-class-write-files-and.html" title="Php - File writer class - write files and take its backups so that it can be easily reverted" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0IDSXY7fSp7ImA9WxVQF0g.&quot;"><id>tag:blogger.com,1999:blog-270257753599767750.post-5995005559394028694</id><published>2009-02-04T18:01:00.003+05:30</published><updated>2009-02-04T18:16:18.805+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-04T18:16:18.805+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="flex" /><category scheme="http://www.blogger.com/atom/ns#" term="reader" /><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="rss" /><title>Flex - Source code for creating a rss reader for your blog in flex</title><content type="html">Source code for creating a rss reader for your blog in flex.Use this&lt;br /&gt;code to create your rss reader using flex builder or flex plugin&lt;p&gt;I have used flex plugin with Eclipse IDE 3.2&lt;/p&gt;&lt;p style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;mx:Application xmlns:mx="&lt;a href="http://www.adobe.com/2006/mxml"&gt;http://www.adobe.com/2006/mxml&lt;/a&gt;"&lt;br /&gt;  layout="absolute"&lt;br /&gt;  width="600"&lt;br /&gt;  height="500"&lt;br /&gt;  horizontalAlign="center"&lt;br /&gt;  verticalAlign="middle"&lt;br /&gt;  backgroundColor="#7F7F7F"&amp;gt;&lt;br /&gt;&lt;br /&gt;!--&amp;lt;mx:HTTPService showBusyCursor="true" id="RSSfeed"&lt;br /&gt;url="&lt;a href="http://wallpaperboss.blogspot.com/feeds/posts/default?alt=rss"&gt;http://wallpaperboss.blogspot.com/feeds/posts/default?alt=rss&lt;/a&gt;"&lt;br /&gt;resultFormat="object" /&amp;gt; --&amp;gt;&lt;br /&gt;&amp;lt;mx:HTTPService showBusyCursor="true" id="RSSfeed"&lt;br /&gt;url="&lt;a href="http://picsweb.blogspot.com/feeds/posts/default?alt=rss"&gt;http://picsweb.blogspot.com/feeds/posts/default?alt=rss&lt;/a&gt;"&lt;br /&gt;resultFormat="object" /&amp;gt;&lt;/p&gt;&lt;p style="color: rgb(0, 0, 0);"&gt;&amp;lt;mx:Panel width="600" height="500" layout="absolute"&lt;br /&gt;horizontalCenter="0" verticalCenter="0" resizeEffect="Resize"&lt;br /&gt;backgroundColor="#7F7F7F" title="Bollywood Blog "&amp;gt;&lt;br /&gt;  &amp;lt;mx:DataGrid width="580" height="100"  id="entries"&lt;br /&gt;dataProvider="{RSSfeed.lastResult.rss.channel.item}"&lt;br /&gt;click="{body.htmlText+=RSSfeed.lastResult.rss.channel.item[entries.selectedIndex].description}"&lt;br /&gt;horizontalCenter="0"&lt;br /&gt;              verticalCenter="-180"&amp;gt;&lt;br /&gt;          &amp;lt;mx:columns&amp;gt; &amp;lt;mx:DataGridColumn dataField="pubDate"&lt;br /&gt;headerText="Date"/&amp;gt;&lt;br /&gt;          &amp;lt;mx:DataGridColumn dataField="title" headerText="Title"/&amp;gt;&lt;br /&gt;      &amp;lt;/mx:columns&amp;gt;&lt;br /&gt;  &amp;lt;/mx:DataGrid&amp;gt;&lt;/p&gt;&lt;p style="color: rgb(0, 0, 0);"&gt;    &amp;lt;mx:TextArea width="580" height="320" id="body" verticalCenter="60"&lt;br /&gt;horizontalCenter="0" verticalScrollPolicy="on" &amp;gt;&lt;br /&gt;      &amp;lt;mx:filters&amp;gt;&lt;br /&gt;        &amp;lt;flash.filters:DropShadowFilter&lt;br /&gt;xmlns:flash.filters="flash.filters.*"&lt;br /&gt;            blurX="5" blurY="5"&lt;br /&gt;            distance="3" angle="45" color="0x000000" alpha="0.4" /&amp;gt;&lt;br /&gt;    &amp;lt;/mx:filters&amp;gt;&lt;br /&gt;  &amp;lt;/mx:TextArea&amp;gt;&lt;/p&gt;&lt;p style="color: rgb(0, 0, 0);"&gt;    &amp;lt;mx:Button toolTip="Click to load recent posts" label="Check"&lt;br /&gt;click="RSSfeed.send()" verticalCenter="-113" horizontalCenter="0"&amp;gt;&lt;br /&gt;          &amp;lt;mx:filters&amp;gt;&lt;br /&gt;                &amp;lt;flash.filters:DropShadowFilter&lt;br /&gt;xmlns:flash.filters="flash.filters.*"&lt;br /&gt;                    distance="3" angle="90" color="0x000000"&lt;br /&gt;alpha="0.4" /&amp;gt;&lt;br /&gt;            &amp;lt;/mx:filters&amp;gt;&lt;br /&gt;        &amp;lt;/mx:Button&amp;gt;&lt;br /&gt;  &amp;lt;mx:Label x="9" y="140" htmlText="&amp;lt;a&lt;br /&gt;href="#"&amp;gt;&lt;a href="http://picsweb.blogspot.com/"&gt;http://picsweb.blogspot.com&lt;/a&gt;&amp;lt;/a&amp;gt;" fontWeight="bold"/&amp;gt;&lt;/p&gt;&lt;p style="color: rgb(0, 0, 0);"&gt;&amp;lt;/mx:Panel&amp;gt;&lt;br /&gt;&amp;lt;/mx:Application&amp;gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/270257753599767750-5995005559394028694?l=phpcodetutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://phpcodetutorials.blogspot.com/feeds/5995005559394028694/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=270257753599767750&amp;postID=5995005559394028694" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5995005559394028694?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/270257753599767750/posts/default/5995005559394028694?v=2" /><link rel="alternate" type="text/html" href="http://phpcodetutorials.blogspot.com/2009/02/flex-source-code-for-creating-rss.html" title="Flex - Source code for creating a rss reader for your blog in flex" /><author><name>Sukesh K</name><uri>http://www.blogger.com/profile/16665923394411517861</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry></feed>

