<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PHP Expert Programmer</title>
	<atom:link href="http://phpexpertprogrammer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpexpertprogrammer.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 20 Apr 2009 13:33:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='phpexpertprogrammer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>PHP Expert Programmer</title>
		<link>http://phpexpertprogrammer.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://phpexpertprogrammer.wordpress.com/osd.xml" title="PHP Expert Programmer" />
	<atom:link rel='hub' href='http://phpexpertprogrammer.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Short open tags not work in php5.2.0 and not in php5.2.3</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/04/20/short-open-tags-not-work-in-php520-and-not-in-php523/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/04/20/short-open-tags-not-work-in-php520-and-not-in-php523/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 13:33:21 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[Php Errors]]></category>
		<category><![CDATA[Php Security]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Php5]]></category>
		<category><![CDATA[Short Open Tags]]></category>
		<category><![CDATA[short_open_tag]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=74</guid>
		<description><![CDATA[Short open tags not work in php5.2.0 and not in php5.2.3 My advice was to put short_open_tag = On in the php.ini file. The server status is short_open_tag = Off I set this to short_open_tag = On in the php.ini file in the root of the site. This did not work but when I renamed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=74&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Short open tags not work in php5.2.0 and not in php5.2.3</h1>
<p>My advice was to put short_open_tag = On in the php.ini file.</p>
<p>The server status is short_open_tag = Off</p>
<p>I set this to short_open_tag = On in the php.ini file in the root of the site.</p>
<p>This did not work but when I renamed the php.ini file to php5.ini this corrected this issue.</p>
<p>However I did not immediately notice but this blocked out the server php.ini file &#8211; this start a major component working as it also blocked out zend optimizer.</p>
<p>I have read more about the issue of the short tag.</p>
<p>I have in my limited experience of php coding always used &lt;!&#8211;p and not &lt;?<br />There appears to be a number opinions that setting short_open_tag = On can cause problems where there are xml files as attempts will be made to parse these.</p>
<p>I have been through every php file in the component &#8211; I can&#8217;t find a short code anywhere in the files.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=74&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/04/20/short-open-tags-not-work-in-php520-and-not-in-php523/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>Fatal error: Allowed memory size of 8388608 bytes exhausted</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/03/26/fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/03/26/fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 16:54:59 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[Php Errors]]></category>
		<category><![CDATA[Php Functions]]></category>
		<category><![CDATA[Php Methods]]></category>
		<category><![CDATA[Php Security]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exhausted]]></category>
		<category><![CDATA[Fatal error]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=66</guid>
		<description><![CDATA[Php Fatal error: Allowed memory size of 8388608 bytes exhausted This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8MB limit. Don’t fret, though, because this is an easy problem to overcome. To change the memory limit for one specific script by including a line [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=66&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Php Fatal error: Allowed memory size of 8388608 bytes exhausted</h2>
<h4>This error message can spring up in a previously functional PHP script when the memory requirements exceed the default 8MB limit. Don’t fret, though, because this is an easy problem to overcome.</h4>
<p>To change the memory limit for one specific script by including a line such as this at the top of the script:</p>
<p><code><span style="color:#993300;">ini_set("memory_limit","12M");</span></code></p>
<p>The 12M sets the limit to 12 megabytes (12582912 bytes). If this doesn’t work, keep increasing the memory limit until your script fits or your server squeals for mercy.</p>
<p>You can also make this change permanently for all PHP scripts running on the server by adding a line like this to the server’s php.ini file:</p>
<p><code><span style="color:#993300;">memory_limit = 12M</span></code></p>
<p>Keep in mind that a huge memory limit is a poor substitute for good coding. A poorly written script may inefficiently squander memory which can cause severe problems for frequently executed scripts. However, some applications are run infrequently and require lots of memory like importing and processing a big data file.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=66&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/03/26/fatal-error-allowed-memory-size-of-8388608-bytes-exhausted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>Resize an image on the fly &amp; keep its aspect ratio</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/03/25/resize-an-image-on-the-fly-keep-its-aspect-ratio/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/03/25/resize-an-image-on-the-fly-keep-its-aspect-ratio/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 22:13:01 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[Php Functions]]></category>
		<category><![CDATA[Php Methods]]></category>
		<category><![CDATA[fly]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[imagecopyresampled]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[resize]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=61</guid>
		<description><![CDATA[Resize an image on the fly &#38; keep its aspect ratio bool imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) imagecopyresampled() copies a rectangular portion of one image to another image, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=61&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Resize an image on the fly &amp; keep its aspect ratio</h2>
<div class="methodsynopsis dc-description"><span class="type">bool</span> <span class="methodname"><strong>imagecopyresampled</strong></span> ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter"><em><span style="font-family:Consolas;">$dst_image</span></em></tt></span> , <span class="methodparam"><span class="type">resource</span> <tt class="parameter"><em><span style="font-family:Consolas;">$src_image</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$dst_x</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$dst_y</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$src_x</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$src_y</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$dst_w</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$dst_h</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$src_w</span></em></tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter"><em><span style="font-family:Consolas;">$src_h</span></em></tt></span> )</div>
<p class="para rdfs-comment"><strong>imagecopyresampled()</strong> copies a rectangular portion of one image to another image, smoothly interpolating pixel values so that, in particular, reducing the size of an image still retains a great deal of clarity.</p>
<p class="para">In other words, <strong>imagecopyresampled()</strong> will take an rectangular area from <em><tt class="parameter"><span style="font-family:Consolas;">src_image</span></tt></em> of width <em><tt class="parameter"><span style="font-family:Consolas;">src_w</span></tt></em> and height <em><tt class="parameter"><span style="font-family:Consolas;">src_h</span></tt></em> at position (<em><tt class="parameter"><span style="font-family:Consolas;">src_x</span></tt></em> ,<em><tt class="parameter"><span style="font-family:Consolas;">src_y</span></tt></em> ) and place it in a rectangular area of <em><tt class="parameter"><span style="font-family:Consolas;">dst_image</span></tt></em> of width <em><tt class="parameter"><span style="font-family:Consolas;">dst_w</span></tt></em> and height <em><tt class="parameter"><span style="font-family:Consolas;">dst_h</span></tt></em> at position (<em><tt class="parameter"><span style="font-family:Consolas;">dst_x</span></tt></em> ,<em><tt class="parameter"><span style="font-family:Consolas;">dst_y</span></tt></em> ).</p>
<p class="para">If the source and destination coordinates and width and heights differ, appropriate stretching or shrinking of the image fragment will be performed. The coordinates refer to the upper left corner. This function can be used to copy regions within the same image (if <em><tt class="parameter"><span style="font-family:Consolas;">dst_image</span></tt></em> is the same as <em><tt class="parameter"><span style="font-family:Consolas;">src_image</span></tt></em> ) but if the regions overlap the results will be unpredictable.</p>
<div class="phpcode"><code><span style="color:#000000;"><span style="color:#0000bb;"><span style="font-family:Consolas;">&lt;?php<br />
</span></span><span style="font-family:Consolas;"><span style="color:#ff8000;">// The file<br />
</span><span style="color:#0000bb;">$filename </span><span style="color:#007700;">= </span><span style="color:#dd0000;">'test.jpg'</span></span><span style="font-family:Consolas;"><span style="color:#007700;">;<br />
</span><span style="color:#0000bb;">$percent </span><span style="color:#007700;">= </span><span style="color:#0000bb;">0.5</span></span><span style="color:#007700;"><span style="font-family:Consolas;">;</p>
<p></span></span><span style="font-family:Consolas;"><span style="color:#ff8000;">// Content type<br />
</span><span style="color:#0000bb;">header</span><span style="color:#007700;">(</span><span style="color:#dd0000;">'Content-type: image/jpeg'</span></span><span style="color:#007700;"><span style="font-family:Consolas;">);</p>
<p></span></span><span style="font-family:Consolas;"><span style="color:#ff8000;">// Get new dimensions<br />
</span><span style="color:#007700;">list(</span><span style="color:#0000bb;">$width</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$height</span><span style="color:#007700;">) = </span><span style="color:#0000bb;">getimagesize</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$filename</span></span><span style="font-family:Consolas;"><span style="color:#007700;">);<br />
</span><span style="color:#0000bb;">$new_width </span><span style="color:#007700;">= </span><span style="color:#0000bb;">$width </span><span style="color:#007700;">* </span><span style="color:#0000bb;">$percent</span></span><span style="font-family:Consolas;"><span style="color:#007700;">;<br />
</span><span style="color:#0000bb;">$new_height </span><span style="color:#007700;">= </span><span style="color:#0000bb;">$height </span><span style="color:#007700;">* </span><span style="color:#0000bb;">$percent</span></span><span style="color:#007700;"><span style="font-family:Consolas;">;</p>
<p></span></span><span style="font-family:Consolas;"><span style="color:#ff8000;">// Resample<br />
</span><span style="color:#0000bb;">$image_p </span><span style="color:#007700;">= </span><span style="color:#0000bb;">imagecreatetruecolor</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$new_width</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$new_height</span></span><span style="font-family:Consolas;"><span style="color:#007700;">);<br />
</span><span style="color:#0000bb;">$image </span><span style="color:#007700;">= </span><span style="color:#0000bb;">imagecreatefromjpeg</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$filename</span></span><span style="font-family:Consolas;"><span style="color:#007700;">);<br />
</span><span style="color:#0000bb;">imagecopyresampled</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$image_p</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$image</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$new_width</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$new_height</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$width</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$height</span></span><span style="color:#007700;"><span style="font-family:Consolas;">);</p>
<p></span></span><span style="font-family:Consolas;"><span style="color:#ff8000;">// Output<br />
</span><span style="color:#0000bb;">imagejpeg</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$image_p</span><span style="color:#007700;">, </span><span style="color:#0000bb;">null</span><span style="color:#007700;">, </span><span style="color:#0000bb;">100</span></span><span style="font-family:Consolas;"><span style="color:#007700;">);<br />
</span><span style="color:#0000bb;">?&gt;</span> </span></span></code></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=61&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/03/25/resize-an-image-on-the-fly-keep-its-aspect-ratio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>Php extract method</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/03/01/php-extract-method/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/03/01/php-extract-method/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 17:23:52 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Functions]]></category>
		<category><![CDATA[Php Methods]]></category>
		<category><![CDATA[extract]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=53</guid>
		<description><![CDATA[&#8220;extract()&#8221; Method Experimentally I found that calling extract() also shows the number of keys if the key is set and is not numeric ! Maybe there was a better definition than mine  . Please have a look to this scripts :&#60;?PHP $var["i"] = &#8220;a&#8221;; $var["j"] = &#8220;b&#8221;; $var["k"] = 1; echo extract($var); // returns 3 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=53&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>&#8220;extract()&#8221; Method</h1>
<p><span class="html"><span style="font-family:Courier New;"><br />
Experimentally I found that calling extract() also shows the number of keys if the key is set and is not numeric ! Maybe there was a better definition than mine  . Please have a look to this scripts :</span><span style="color:#800000;"><span class="default">&lt;?PHP<br />
$var</span><span class="keyword">[</span><span class="string">"i"</span><span class="keyword">] = </span><span class="string">&#8220;a&#8221;</span></span><span style="color:#800000;"><span class="keyword">;<br />
</span><span class="default">$var</span><span class="keyword">[</span><span class="string">"j"</span><span class="keyword">] = </span><span class="string">&#8220;b&#8221;</span></span><span style="color:#800000;"><span class="keyword">;<br />
</span><span class="default">$var</span><span class="keyword">[</span><span class="string">"k"</span><span class="keyword">] = </span><span class="default">1</span></span><span style="color:#800000;"><span class="keyword">;<br />
echo </span><span class="default">extract</span><span class="keyword">(</span><span class="default">$var</span><span class="keyword">); </span></span><span class="comment"><span style="color:#800000;">// returns 3<br />
</span></span><span style="color:#800000;"><span class="default">?&gt;<br />
</span><br />
</span><span style="color:#800000;"><span class="default">&lt;?PHP<br />
$var2</span><span class="keyword">[</span><span class="string">"i"</span><span class="keyword">] = </span><span class="string">&#8220;a&#8221;</span></span><span style="color:#800000;"><span class="keyword">;<br />
</span><span class="default">$var2</span><span class="keyword">[</span><span class="default">2</span><span class="keyword">] = </span><span class="string">&#8220;b&#8221;</span></span><span style="color:#800000;"><span class="keyword">;<br />
</span><span class="default">$var2</span><span class="keyword">[] = </span><span class="default">1</span></span><span style="color:#800000;"><span class="keyword">;<br />
echo </span><span class="default">extract</span><span class="keyword">(</span><span class="default">$var2</span><span class="keyword">); </span></span><span style="color:#800000;"><span class="comment">// returns 1<br />
</span></span><span class="default"><span style="color:#800000;">?&gt;</span></span></span><span style="font-family:Courier New;"> </span></p>
<p> </p>
<p>(Arash Moslehi)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=53&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/03/01/php-extract-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending Email with Attachment</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-email-with-attachment/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-email-with-attachment/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 18:30:26 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[Email with Attachment]]></category>
		<category><![CDATA[Php Email]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=47</guid>
		<description><![CDATA[The last variation that we will consider is email with attachments. To send an email with attachment we need to use the multipart/mixed MIME type that specifies that mixed types will be included in the email. Moreover, we want to use multipart/alternative MIME type to send both plain-text and HTML version of the email. Have a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=47&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The last variation that we will consider is email with attachments. To send an email with attachment we need to use the multipart/mixed MIME type that specifies that mixed types will be included in the email. Moreover, we want to use multipart/alternative MIME type to send both plain-text and HTML version of the email. Have a look at the example:</p>
<div class="phpcode"><span style="color:#993300;">&lt;?php<br />
<span class="comment">//define the receiver of the email</span><br />
$to = &#8216;youraddress@example.com&#8217;;<br />
<span class="comment">//define the subject of the email</span><br />
$subject = &#8216;Test email with attachment&#8217;;<br />
</span><span style="color:#993300;"><span class="comment">//create a boundary string. It must be unique<br />
//so we use the MD5 algorithm to generate a random hash</span><br />
$random_hash = md5(date(&#8216;r&#8217;, time()));<br />
<span class="comment">//define the headers we want passed. Note that they are separated with \r\n</span><br />
$headers = &#8220;From: webmaster@example.com\r\nReply-To: webmaster@example.com&#8221;;<br />
<span class="comment">//add boundary string and mime type specification</span><br />
$headers .= &#8220;\r\nContent-Type: multipart/mixed; boundary=\&#8221;PHP-mixed-&#8221;.$random_hash.&#8221;\&#8221;";<br />
</span><span style="color:#993300;"><span class="comment">//read the atachment file contents into a string,<br />
//encode it with MIME base64,<br />
//and split it into smaller chunks</span><br />
$attachment = chunk_split(base64_encode(file_get_contents(&#8216;attachment.zip&#8217;)));<br />
<span class="comment">//define the body of the message.</span><br />
ob_start(); <span class="comment">//Turn on output buffering</span><br />
?&gt;<br />
&#8211;PHP-mixed-&lt;?php echo $random_hash; ?&gt; <br />
Content-Type: multipart/alternative; boundary=&#8221;PHP-alt-&lt;?php echo $random_hash; ?&gt;&#8221;</span></div>
<p><span style="color:#993300;">&#8211;PHP-alt-&lt;?php echo $random_hash; ?&gt; <br />
Content-Type: text/plain; charset=&#8221;iso-8859-1&#8243;<br />
Content-Transfer-Encoding: 7bit</span></p>
<p><span style="color:#993300;">Hello World!!!<br />
This is simple text email message.</span></p>
<p><span style="color:#993300;">&#8211;PHP-alt-&lt;?php echo $random_hash; ?&gt; <br />
Content-Type: text/html; charset=&#8221;iso-8859-1&#8243;<br />
Content-Transfer-Encoding: 7bit</span></p>
<p><span style="color:#993300;">&lt;h2&gt;Hello World!&lt;/h2&gt;<br />
&lt;p&gt;This is something with &lt;b&gt;HTML&lt;/b&gt; formatting.&lt;/p&gt;</span></p>
<p><span style="color:#993300;">&#8211;PHP-alt-&lt;?php echo $random_hash; ?&gt;&#8211;</span></p>
<p><span style="color:#993300;">&#8211;PHP-mixed-&lt;?php echo $random_hash; ?&gt; <br />
Content-Type: application/zip; name=&#8221;attachment.zip&#8221; <br />
Content-Transfer-Encoding: base64 <br />
Content-Disposition: attachment </span></p>
<p><span style="color:#993300;">&lt;?php echo $attachment; ?&gt;<br />
&#8211;PHP-mixed-&lt;?php echo $random_hash; ?&gt;&#8211;</span></p>
<p><span style="color:#993300;">&lt;?php<br />
<span class="comment">//copy current buffer contents into $message variable and delete current output buffer</span><br />
$message = ob_get_clean();<br />
<span class="comment">//send the email</span><br />
$mail_sent = @mail( $to, $subject, $message, $headers );<br />
<span class="comment">//if the message is sent successfully print &#8220;Mail sent&#8221;. Otherwise print &#8220;Mail failed&#8221; </span><br />
echo $mail_sent ? &#8220;Mail sent&#8221; : &#8220;Mail failed&#8221;;<br />
?&gt;</span></p>
<p>As you can see, sending an email with attachment is easy to accomplish. In the preceding example we have multipart/mixed MIME type, and inside it we have multipart/alternative MIME type that specifies two versions of the email. To include an attachment to our message, we read the data from the specified file into a string, encode it with base64,  split it in smaller chunks to make sure that it matches the MIME specifications and then include it as an attachment.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=47&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-email-with-attachment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending HTML Email</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-html-email/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-html-email/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 18:24:56 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[HTML Email]]></category>
		<category><![CDATA[Php Email]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=44</guid>
		<description><![CDATA[The next step is to examine how to send HTML email. However, some mail clients cannot understand HTML emails. Therefore it is best to send any HTML email using a multipart construction, where one part contains a plain-text version of the email and the other part is HTML. If your customers have HTML email turned [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=44&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The next step is to examine how to send HTML email. However, some mail clients cannot understand HTML emails. Therefore it is best to send any HTML email using a multipart construction, where one part contains a plain-text version of the email and the other part is HTML. If your customers have HTML email turned off, they will still get a nice email, even if they don&#8217;t get all of the HTML markup. Have a look at the example:</p>
<div class="phpcode"><span style="color:#993300;">&lt;?php<br />
<span class="comment">//define the receiver of the email</span><br />
$to = &#8216;youraddress@example.com&#8217;;<br />
<span class="comment">//define the subject of the email</span><br />
$subject = &#8216;Test HTML email&#8217;;<br />
</span><span style="color:#993300;"><span class="comment">//create a boundary string. It must be unique<br />
//so we use the MD5 algorithm to generate a random hash<br />
</span>$random_hash = md5(date(&#8216;r&#8217;, time()));<br />
<span class="comment">//define the headers we want passed. Note that they are separated with \r\n</span><br />
$headers = &#8220;From: webmaster@example.com\r\nReply-To: webmaster@example.com&#8221;;<br />
<span class="comment">//add boundary string and mime type specification</span><br />
$headers .= &#8221;\r\nContent-Type: multipart/alternative; boundary=\&#8221;PHP-alt-&#8221;.$random_hash.&#8221;\&#8221;";<br />
</span><span style="color:#993300;"><span class="comment">//define the body of the message.<br />
</span>ob_start(); //Turn on output buffering<br />
?&gt;<br />
&#8211;PHP-alt-&lt;?php echo $random_hash; ?&gt; <br />
Content-Type: text/plain; charset=&#8221;iso-8859-1&#8243;<br />
Content-Transfer-Encoding: 7bit</span></div>
<p><span style="color:#993300;">Hello World!!! <br />
This is simple text email message. </span></p>
<p><span style="color:#993300;">&#8211;PHP-alt-&lt;?php echo $random_hash; ?&gt; <br />
Content-Type: text/html; charset=&#8221;iso-8859-1&#8243;<br />
Content-Transfer-Encoding: 7bit</span></p>
<p><span style="color:#993300;">&lt;h2&gt;Hello World!&lt;/h2&gt;<br />
&lt;p&gt;This is something with &lt;b&gt;HTML&lt;/b&gt; formatting.&lt;/p&gt;</span></p>
<p><span style="color:#993300;">&#8211;PHP-alt-&lt;?php echo $random_hash; ?&gt;&#8211;<br />
&lt;?<br />
<span class="comment">//copy current buffer contents into $message variable and delete current output buffer</span><br />
$message = ob_get_clean();<br />
</span><span style="color:#993300;"><span class="comment">//send the email<br />
</span>$mail_sent = @mail( $to, $subject, $message, $headers );<br />
<span class="comment">//if the message is sent successfully print &#8220;Mail sent&#8221;. Otherwise print &#8220;Mail failed&#8221; </span><br />
echo $mail_sent ? &#8220;Mail sent&#8221; : &#8220;Mail failed&#8221;;<br />
?&gt;</span></p>
<p>In the preceding example we add one additional header of Content-type:multipart/alternative and boundary string that marks the different areas of the email. Note that the content type of the message itself is sent as a mail header, while the content types of the individual parts of the message are embedded in the message itself. This way, mail clients can decide which part of the message they want to display.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=44&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-html-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending a Simple Text Email</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-a-simple-text-email/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-a-simple-text-email/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 18:23:18 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Php Email]]></category>
		<category><![CDATA[Simple Text Email]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=42</guid>
		<description><![CDATA[At first let&#8217;s consider how to send a simple text email messages. PHP includes the mail() function for sending email, which takes three basic and two optional parameters. These parameters are, in order, the email address to send to, the subject of the email, the message to be sent, additional headers you want to include [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=42&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At first let&#8217;s consider how to send a simple text email messages. PHP includes the <em>mail()</em> function for sending email, which takes three basic and two optional parameters. These parameters are, in order, the email address to send to, the subject of the email, the message to be sent, additional headers you want to include and finally an additional parameter to the Sendmail program. The <em>mail()</em> function returns True if the message is sent successfully and False otherwise. Have a look at the example:</p>
<div class="phpcode"><span style="color:#993300;">&lt;?php<br />
<span class="comment">//define the receiver of the email</span><br />
$to = &#8216;youraddress@example.com&#8217;;<br />
<span class="comment">//define the subject of the email</span><br />
$subject = &#8216;Test email&#8217;;<br />
<span class="comment">//define the message to be sent. Each line should be separated with \n</span><br />
$message = &#8220;Hello World!\n\nThis is my first mail.&#8221;;<br />
<span class="comment">//define the headers we want passed. Note that they are separated with \r\n</span><br />
$headers = &#8220;From: webmaster@example.com\r\nReply-To: webmaster@example.com&#8221;;<br />
</span><span style="color:#993300;"><span class="comment">//send the email<br />
</span>$mail_sent = @mail( $to, $subject, $message, $headers );<br />
<span class="comment">//if the message is sent successfully print &#8220;Mail sent&#8221;. Otherwise print &#8220;Mail failed&#8221; </span><br />
echo $mail_sent ? &#8220;Mail sent&#8221; : &#8220;Mail failed&#8221;;<br />
?&gt;</span></div>
<p>As you can see, it very easy to send an email. You can add more receivers by either adding their addresses, comma separated, to the $to variable, or by adding cc: or bcc: headers. If you don&#8217;t receive the test mail, you have probably installed PHP incorrectly, or may not have permission to send emails.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=42&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/02/08/sending-a-simple-text-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>how to remove html tags from text in php</title>
		<link>http://phpexpertprogrammer.wordpress.com/2009/02/06/how-to-remove-html-tags-from-text-in-php/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2009/02/06/how-to-remove-html-tags-from-text-in-php/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 15:30:08 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[remove html tags]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=39</guid>
		<description><![CDATA[if you are reading my post, its probably because you want to remove html tags from your posts or forums or whatever. when i first started to do this, i wanted to remove all the html tags from a strin i had in my posts. this is an example: &#60;? $string = &#8220;&#60;h1&#62;BIG HTML TAGS&#60;/h1&#62;&#8221;; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=39&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>if you are reading my post, its probably because you want to remove html tags from your posts or forums or whatever.</p>
<p>when i first started to do this, i wanted to remove all the html tags from a strin i had in my posts. this is an example:</p>
<div class="code">&lt;?<br />
$string = &#8220;&lt;h1&gt;BIG HTML TAGS&lt;/h1&gt;&#8221;;<br />
?&gt;</div>
<p>ok as you can see, this will output:</p>
<h1>BIG HTML TAGS</h1>
<p>but i dont want that, i want to stop and prevent html from being posted on my forums. i tried using htmlspecialchars() and htmlentities() but none did what i wanted.</p>
<p>but finally i found it, the function is called strip_tags()</p>
<p>so if i wanted to remove the &lt;h1&gt; tags from my string i would just simply do this:</p>
<div class="code">&lt;?<br />
$string = &#8220;&lt;h1&gt;BIG HTML TAGS&lt;/h1&gt;&#8221;;<br />
$string = strip_tags($string);<br />
?&gt;</div>
<p>and this would be the ouput:</p>
<div class="code">BIG HTML TAGS</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=39&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2009/02/06/how-to-remove-html-tags-from-text-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>X-Cart – ecommerce shopping cart software</title>
		<link>http://phpexpertprogrammer.wordpress.com/2008/08/18/x-cart-ecommerce-shopping-cart-software/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2008/08/18/x-cart-ecommerce-shopping-cart-software/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 00:59:30 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php CMS]]></category>
		<category><![CDATA[Php Shopping Carts]]></category>
		<category><![CDATA[ecommerce software]]></category>
		<category><![CDATA[ecommerce solution]]></category>
		<category><![CDATA[php shopping cart]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[shopping cart software]]></category>
		<category><![CDATA[shopping carts]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=35</guid>
		<description><![CDATA[X-Cart – ecommerce shopping cart software: X-Cart shopping cart software is based on PHP Smarty templates, this makes it very flexible and easy to modify. The data is stored in MySQL database. W3C XHTML 1.0 compliance of X-Cart storefront out of the box. You receive a complete source code and SQL tables for MySQL database to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=35&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>X-Cart – ecommerce shopping cart software:</h1>
<ul class="ProductFeatures">
<li>X-Cart shopping cart software is based on PHP Smarty templates, this makes it very flexible and easy to modify. The data is stored in MySQL database.</li>
<li>W3C XHTML 1.0 compliance of X-Cart storefront out of the box.</li>
<li>You receive a complete source code and SQL tables for MySQL database to make them extended or customized easily.</li>
<li>X-Cart is a turnkey package. Installation is handled by web-based step-by-step wizard to make the system running immediately after receiving it.</li>
<li>X-Cart is search engine friendly. It has integrated HTML catalog functionality to gain benefits of dynamic content and static HTML preferred by search engines.</li>
<li>We bundle our software with <a href="http://www.x-cart.com/support_resources.html">24&#215;7 free technical support</a> for beginners. Our experts are always ready to answer questions, even handle installation &amp; configuration tasks.</li>
<li>We also offer custom programming services. Every client can get a storefront with a unique look. We can customize the software to completely fit the structure of your business.</li>
<li>Additional software licenses come at <a href="http://phpexpertprogrammer.wordpress.com/wp-admin/pricing.html">discounted rates</a>.</li>
</ul>
<h1>More advantages:</h1>
<p style="margin:15px 0;">Robust feature rich ecommerce shopping cart software is a key in online business success. Its potential can be multiplied many times if accompanied by coherent resources &amp; services to give a hand on the way to online success not leaving you alone when operating live ecommerce website:</p>
<ul class="ProductFeatures">
<li>
<h2 class="Item">Moneyback guarantee</h2>
<p>We offer unconditional <a href="http://phpexpertprogrammer.wordpress.com/wp-admin/moneyback_policy.html">30-day money back guarantee</a> as a sign of our products quality to ensure best customers&#8217; experience in any case. Simply request a refund within 30 days since purchase to have all the money back.</li>
<li>
<h2 class="Item">Community forums</h2>
<p>The value of help provided by community forums should not be underestimated. Share experience with thousands of real business owners to find answers &amp; hints to be successful. The <a rel="nofollow" href="http://forum.x-cart.com/" target="_blank">forums</a> are intentionally made available for clients only to ensure community forums are the meeting point of people who actually are in the business.</li>
<li>
<h2 class="Item">Responsive support</h2>
<p><a href="http://phpexpertprogrammer.wordpress.com/wp-admin/support_resources.html">Free technical support</a> offered with each license guarantees successful project launching. We designed our software to minimize the need of this, so free technical support is a warranty card to keep you confident.</li>
<li>
<h2 class="Item">Partnership</h2>
<p>Regardless of whether you are a web hosting provider, developer, payment gateway or ISP, we can setup a partner relationship profitable for both parties. Read about our <a href="http://phpexpertprogrammer.wordpress.com/wp-admin/become_affiliate.html">Affiliate program</a> and see <a href="http://phpexpertprogrammer.wordpress.com/wp-admin/pricing.html">Reseller prices</a>.</li>
</ul>
<p>Website: <a href="http://www.x-cart.com/">http://www.x-cart.com/</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/phpexpertprogrammer.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/phpexpertprogrammer.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=35&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2008/08/18/x-cart-ecommerce-shopping-cart-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Email Address Validation</title>
		<link>http://phpexpertprogrammer.wordpress.com/2008/07/29/php-email-address-validation/</link>
		<comments>http://phpexpertprogrammer.wordpress.com/2008/07/29/php-email-address-validation/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 22:17:40 +0000</pubDate>
		<dc:creator>sarapeter</dc:creator>
				<category><![CDATA[Php Codes]]></category>
		<category><![CDATA[Php Validators]]></category>
		<category><![CDATA[Email Address]]></category>
		<category><![CDATA[Email Validator]]></category>
		<category><![CDATA[Php Email]]></category>

		<guid isPermaLink="false">http://phpexpertprogrammer.wordpress.com/?p=20</guid>
		<description><![CDATA[&#60;?Php function check_email_address($email) { // First, we check that there&#8217;s one @ symbol, and that the lengths are right if (!ereg(&#8220;^[^@]{1,64}@[^@]{1,255}$&#8221;, $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode(&#8220;@&#8221;, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=20&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#800000;">&lt;?Php<br />
function check_email_address($email) {<br />
    // First, we check that there&#8217;s one @ symbol, and that the lengths are right<br />
    if (!ereg(&#8220;^[^@]{1,64}@[^@]{1,255}$&#8221;, $email)) {<br />
        // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.<br />
        return false;<br />
    }<br />
    // Split it into sections to make life easier<br />
    $email_array = explode(&#8220;@&#8221;, $email);<br />
    $local_array = explode(&#8220;.&#8221;, $email_array[0]);<br />
    for ($i = 0; $i &lt; sizeof($local_array); $i++) {<br />
         if (!ereg(&#8220;^(([A-Za-z0-9!#$%&amp;'*+/=?^_`{|}~-][A-Za-z0-9!#$%&amp;'*+/=?^_`{|}~\.-]{0,63})|(\&#8221;[^(\\|\")]{0,62}\&#8221;))$&#8221;, $local_array[$i])) {<br />
            return false;<br />
        }<br />
    }<br />
    if (!ereg(&#8220;^\[?[0-9\.]+\]?$&#8221;, $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name<br />
        $domain_array = explode(&#8220;.&#8221;, $email_array[1]);<br />
        if (sizeof($domain_array) &lt; 2) {<br />
                return false; // Not enough parts to domain<br />
        }<br />
        for ($i = 0; $i &lt; sizeof($domain_array); $i++) {<br />
            if (!ereg(&#8220;^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$&#8221;, $domain_array[$i])) {<br />
                return false;<br />
            }<br />
        }<br />
    }<br />
    return true;<br />
}<br />
?&gt;</span></p>
<p>Using the function above is relatively simple, as you can see:</p>
<p><span style="color:#800000;">&lt;?Php<br />
if (check_email_address($email)) {<br />
    echo $email . &#8216; is a valid email address.&#8217;;<br />
} else {<br />
    echo $email . &#8216; is not a valid email address.&#8217;;<br />
}<br />
?&gt;</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/phpexpertprogrammer.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/phpexpertprogrammer.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpexpertprogrammer.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpexpertprogrammer.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpexpertprogrammer.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpexpertprogrammer.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpexpertprogrammer.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpexpertprogrammer.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpexpertprogrammer.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpexpertprogrammer.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpexpertprogrammer.wordpress.com&amp;blog=4016769&amp;post=20&amp;subd=phpexpertprogrammer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpexpertprogrammer.wordpress.com/2008/07/29/php-email-address-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ada5375ba151ca886516ee0187b0cf8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sara Peter</media:title>
		</media:content>
	</item>
	</channel>
</rss>
