<?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>Basic Codes</title>
	<atom:link href="http://basiccodes.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://basiccodes.wordpress.com</link>
	<description>Useful Codes &#38; Tips for Web Coding and Macros</description>
	<lastBuildDate>Tue, 14 Sep 2010 04:31:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='basiccodes.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Basic Codes</title>
		<link>http://basiccodes.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://basiccodes.wordpress.com/osd.xml" title="Basic Codes" />
	<atom:link rel='hub' href='http://basiccodes.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Get the ID generated in the last query (PHP)</title>
		<link>http://basiccodes.wordpress.com/2010/09/14/get-the-id-generated-in-the-last-query-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/09/14/get-the-id-generated-in-the-last-query-php/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 04:31:19 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=51</guid>
		<description><![CDATA[mysql_insert_id — Get the ID generated in the last query Use mysql_insert_id(); More information can be found at: http://php.net/mysql_insert_id Get the ID generated in the last query<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=51&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>mysql_insert_id — Get the ID generated in the last query</p>
<p>Use</p>
<blockquote><p>mysql_insert_id();</p></blockquote>
<p>More information can be found at:</p>
<p>http://php.net/mysql_insert_id</p>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;overflow:hidden;">Get the ID generated in the last query</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=51&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/09/14/get-the-id-generated-in-the-last-query-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Alphanumeric with atleast 1 numeric (PHP)</title>
		<link>http://basiccodes.wordpress.com/2010/08/12/print-alphanumeric-with-atleast-1-numeric-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/08/12/print-alphanumeric-with-atleast-1-numeric-php/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 14:31:32 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=47</guid>
		<description><![CDATA[How to print 3 letter Alphanumeric with atleast 1 character as Numeric. &#60;?php $alphanumeric= array(&#8220;0&#8243;,&#8221;1&#8243;,&#8221;2&#8243;,&#8221;3&#8243;,&#8221;4&#8243;,&#8221;5&#8243;,&#8221;6&#8243;,&#8221;7&#8243;,&#8221;8&#8243;,&#8221;9&#8243;,&#8221;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;,&#8221;D&#8221;,&#8221;E&#8221;,&#8221;F&#8221;,&#8221;G&#8221;,&#8221;H&#8221;,&#8221;I&#8221;,&#8221;J&#8221;,&#8221;K&#8221;,&#8221;L&#8221;,&#8221;M&#8221;,&#8221;N&#8221;,&#8221;O&#8221;,&#8221;P&#8221;,&#8221;Q&#8221;,&#8221;R&#8221;,&#8221;S&#8221;,&#8221;T&#8221;,&#8221;U&#8221;,&#8221;V&#8221;,&#8221;W&#8221;,&#8221;X&#8221;,&#8221;Y&#8221;,&#8221;Z&#8221;); for($i=0; $i&#60;36; $i++) { for($j=0; $j&#60;36; $j++) { for($k=0; $k&#60;36; $k++) { if($i&#62;=&#8217;10&#8242; &#38;&#38; $j&#62;=&#8217;10&#8242; &#38;&#38; $k&#62;=&#8217;10&#8242;) { } else { $newword=$alphanumeric[$i].$alphanumeric[$j].$alphanumeric[$k]; echo &#8220;$newword&#60;br&#62;&#8221;; } } } } ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=47&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to print 3 letter Alphanumeric with atleast 1 character as Numeric.</p>
<blockquote><p>&lt;?php</p>
<p>$alphanumeric= array(&#8220;0&#8243;,&#8221;1&#8243;,&#8221;2&#8243;,&#8221;3&#8243;,&#8221;4&#8243;,&#8221;5&#8243;,&#8221;6&#8243;,&#8221;7&#8243;,&#8221;8&#8243;,&#8221;9&#8243;,&#8221;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;,&#8221;D&#8221;,&#8221;E&#8221;,&#8221;F&#8221;,&#8221;G&#8221;,&#8221;H&#8221;,&#8221;I&#8221;,&#8221;J&#8221;,&#8221;K&#8221;,&#8221;L&#8221;,&#8221;M&#8221;,&#8221;N&#8221;,&#8221;O&#8221;,&#8221;P&#8221;,&#8221;Q&#8221;,&#8221;R&#8221;,&#8221;S&#8221;,&#8221;T&#8221;,&#8221;U&#8221;,&#8221;V&#8221;,&#8221;W&#8221;,&#8221;X&#8221;,&#8221;Y&#8221;,&#8221;Z&#8221;);</p>
<p>for($i=0; $i&lt;36; $i++)<br />
{<br />
for($j=0; $j&lt;36; $j++)<br />
{<br />
for($k=0; $k&lt;36; $k++)<br />
{</p>
<p>if($i&gt;=&#8217;10&#8242; &amp;&amp; $j&gt;=&#8217;10&#8242; &amp;&amp; $k&gt;=&#8217;10&#8242;)<br />
{<br />
}<br />
else<br />
{<br />
$newword=$alphanumeric[$i].$alphanumeric[$j].$alphanumeric[$k];<br />
echo &#8220;$newword&lt;br&gt;&#8221;;<br />
}</p>
<p>}<br />
}<br />
}</p>
<p>?&gt;</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=47&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/08/12/print-alphanumeric-with-atleast-1-numeric-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Alphanumeric (PHP)</title>
		<link>http://basiccodes.wordpress.com/2010/08/12/print-alphanumeric-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/08/12/print-alphanumeric-php/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 14:30:03 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=45</guid>
		<description><![CDATA[How to print all 3 letter long Alphanumeric words. &#60;?php $alphanumeric= array(&#8220;0&#8243;,&#8221;1&#8243;,&#8221;2&#8243;,&#8221;3&#8243;,&#8221;4&#8243;,&#8221;5&#8243;,&#8221;6&#8243;,&#8221;7&#8243;,&#8221;8&#8243;,&#8221;9&#8243;,&#8221;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;,&#8221;D&#8221;,&#8221;E&#8221;,&#8221;F&#8221;,&#8221;G&#8221;,&#8221;H&#8221;,&#8221;I&#8221;,&#8221;J&#8221;,&#8221;K&#8221;,&#8221;L&#8221;,&#8221;M&#8221;,&#8221;N&#8221;,&#8221;O&#8221;,&#8221;P&#8221;,&#8221;Q&#8221;,&#8221;R&#8221;,&#8221;S&#8221;,&#8221;T&#8221;,&#8221;U&#8221;,&#8221;V&#8221;,&#8221;W&#8221;,&#8221;X&#8221;,&#8221;Y&#8221;,&#8221;Z&#8221;); for($i=0; $i&#60;36; $i++) { for($j=0; $j&#60;36; $j++) { for($k=0; $k&#60;36; $k++) { $newword=$alphanumeric[$i].$alphanumeric[$j].$alphanumeric[$k]; echo &#8220;$newword&#60;br&#62;&#8221;; } } } ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=45&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to print all 3 letter long Alphanumeric words.</p>
<blockquote><p>&lt;?php</p>
<p>$alphanumeric= array(&#8220;0&#8243;,&#8221;1&#8243;,&#8221;2&#8243;,&#8221;3&#8243;,&#8221;4&#8243;,&#8221;5&#8243;,&#8221;6&#8243;,&#8221;7&#8243;,&#8221;8&#8243;,&#8221;9&#8243;,&#8221;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;,&#8221;D&#8221;,&#8221;E&#8221;,&#8221;F&#8221;,&#8221;G&#8221;,&#8221;H&#8221;,&#8221;I&#8221;,&#8221;J&#8221;,&#8221;K&#8221;,&#8221;L&#8221;,&#8221;M&#8221;,&#8221;N&#8221;,&#8221;O&#8221;,&#8221;P&#8221;,&#8221;Q&#8221;,&#8221;R&#8221;,&#8221;S&#8221;,&#8221;T&#8221;,&#8221;U&#8221;,&#8221;V&#8221;,&#8221;W&#8221;,&#8221;X&#8221;,&#8221;Y&#8221;,&#8221;Z&#8221;);</p>
<p>for($i=0; $i&lt;36; $i++)<br />
{<br />
for($j=0; $j&lt;36; $j++)<br />
{<br />
for($k=0; $k&lt;36; $k++)<br />
{</p>
<p>$newword=$alphanumeric[$i].$alphanumeric[$j].$alphanumeric[$k];<br />
echo &#8220;$newword&lt;br&gt;&#8221;;</p>
<p>}<br />
}<br />
}</p>
<p>?&gt;</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=45&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/08/12/print-alphanumeric-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Alphabets (PHP)</title>
		<link>http://basiccodes.wordpress.com/2010/07/31/print-alphabets-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/31/print-alphabets-php/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 04:04:42 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=42</guid>
		<description><![CDATA[How to Print Alphabets. You can print a range of Alphabets e.g. from A to Z or A to ZZ like A, B, C &#8230; AA, AB, AZ&#8230; ZY, ZZ and more $length=&#8221;3&#8243;; for ($alpha=&#8217;A'; strlen($alpha)&#60;=$length; $alpha++) { print &#8220;$alpha&#60;br&#62;&#8221;; }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=42&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to Print Alphabets.</p>
<p>You can print a range of Alphabets e.g. from A to Z or A to ZZ like A, B, C &#8230; AA, AB, AZ&#8230; ZY, ZZ and more</p>
<blockquote><p>$length=&#8221;3&#8243;;</p>
<p>for ($alpha=&#8217;A'; strlen($alpha)&lt;=$length; $alpha++)<br />
{</p>
<p>print &#8220;$alpha&lt;br&gt;&#8221;;</p>
<p>}</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=42&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/31/print-alphabets-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Reset Auto Increment (using PHP)</title>
		<link>http://basiccodes.wordpress.com/2010/07/11/reset-auto-increment-using-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/11/reset-auto-increment-using-php/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 16:35:11 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=40</guid>
		<description><![CDATA[Run the following Query: ALTER TABLE tablename AUTO_INCREMENT = 1<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=40&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><code>Run the following Query:</code></strong></p>
<p><strong><code>ALTER TABLE <em>tablename</em> AUTO_INCREMENT = 1</code></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=40&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/11/reset-auto-increment-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Page Generation Time (using PHP)</title>
		<link>http://basiccodes.wordpress.com/2010/07/11/page-generation-time-using-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/11/page-generation-time-using-php/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 14:18:10 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=36</guid>
		<description><![CDATA[With this script you can display how much this Time this page has taken to load. &#60;?php // Insert at the start of your document $time = round(microtime(), 3); // Insert at the end of your document $time2 = round(microtime(), 3); $generation = $time2 &#8211; $time; echo &#8220;This page took $generation seconds to render&#8221;; ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=36&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With this script you can display how much this Time this page has taken to load.</p>
<p>&lt;?php</p>
<p>// Insert at the start of your document<br />
$time = round(microtime(), 3);</p>
<p>// Insert at the end of your document<br />
$time2 = round(microtime(), 3);</p>
<p>$generation = $time2 &#8211; $time;</p>
<p>echo &#8220;This page took $generation seconds to render&#8221;;<br />
?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=36&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/11/page-generation-time-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Fetching data from a Page (data between Tags) using PHP</title>
		<link>http://basiccodes.wordpress.com/2010/07/11/fetching-data-from-a-page-data-between-tags-using-php/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/11/fetching-data-from-a-page-data-between-tags-using-php/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 14:15:40 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=32</guid>
		<description><![CDATA[You can fetch data from a webpage by using this script. It is useful when you need to fetch data like Stock Rates on your site. Like if you want to fetch data between span tags. &#60;?php // retrieve htmltagcontent tag contents function get_htmltagcontent($file){ $h1tags = preg_match_all(&#8216;/(&#60;span&#62;)(.*)(&#60;\/span&#62;)/ismU&#8217;,$file,$patterns); $res = array(); array_push($res,$patterns[2]); array_push($res,count($patterns[2])); return $res; } [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=32&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can fetch data from a webpage by using this script. It is useful when you need to fetch data like Stock Rates on your site.</p>
<p>Like if you want to fetch data between <strong>span</strong> tags.</p>
<p>&lt;?php</p>
<p>// retrieve htmltagcontent tag contents<br />
function get_htmltagcontent($file){<br />
$h1tags = preg_match_all(&#8216;/(&lt;span&gt;)(.*)(&lt;\/span&gt;)/ismU&#8217;,$file,$patterns);<br />
$res = array();<br />
array_push($res,$patterns[2]);<br />
array_push($res,count($patterns[2]));<br />
return $res;<br />
}</p>
<p>$url_base=&#8221;http://Specify Base URL/&#8221;;<br />
$url_dir=&#8221;Specify Directory Here or Leave it Blank&#8221;;</p>
<p>$pages_start=&#8221;1&#8243;;<br />
$pages_num=&#8221;2&#8243;;<br />
$pages_rows=&#8221;10&#8243;;</p>
<p>for($i=$pages_start; $i&lt;($pages_num+$pages_start); $i++)<br />
{<br />
$url_query=($i*$pages_rows).&#8221;/&#8221;; //Create URL Query Part here<br />
$url=$url_base.$url_dir.$url_query;</p>
<p>$file = file_get_contents($url);<br />
$htmltagcontent  = get_htmltagcontent($file);</p>
<p>if($htmltagcontent[1] != 0)</p>
<p>{</p>
<p>foreach($htmltagcontent[0] as $key =&gt; $val){<br />
echo &#8220;&lt;li&gt;####&#8221; . $val . &#8220;&lt;/li&gt;&#8221;;<br />
}<br />
echo &#8220;&lt;/ul&gt;&#8221;;<br />
}</p>
<p>else</p>
<p>{<br />
echo &#8220;&lt;br/&gt;&lt;div class=\&#8221;error\&#8221;&gt;No Tags found&lt;/div&gt;&lt;br/&gt;&#8221;;<br />
}</p>
<p>}<br />
?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=32&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/11/fetching-data-from-a-page-data-between-tags-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Get Title of a Webpage using PHP – 3</title>
		<link>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-%e2%80%93-3/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-%e2%80%93-3/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 17:58:26 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=29</guid>
		<description><![CDATA[&#60;?php function getTitle($url) { $fh = fopen($url, &#8220;r&#8221;); $str = fread($fh, 5000); fclose($fh); $str2 = strtolower($str); $start = strpos($str2, &#8220;&#60;title&#62;&#8221;)+7; $len   = strpos($str2, &#8220;&#60;/title&#62;&#8221;) &#8211; $start; return substr($str, $start, $len); } ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=29&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;?php</p>
<p>function getTitle($url) {</p>
<p>$fh = fopen($url, &#8220;r&#8221;);<br />
$str = fread($fh, 5000);<br />
fclose($fh);<br />
$str2 = strtolower($str);<br />
$start = strpos($str2, &#8220;&lt;title&gt;&#8221;)+7;<br />
$len   = strpos($str2, &#8220;&lt;/title&gt;&#8221;) &#8211; $start;<br />
return substr($str, $start, $len);<br />
}</p>
<p>?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=29&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-%e2%80%93-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Get Title of a Webpage using PHP &#8211; 2</title>
		<link>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-2/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-2/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 17:57:15 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=27</guid>
		<description><![CDATA[&#60;?php $url=&#8221;http://example.com&#8221;; echo getTitle($url); function get_page_title($url) { if( !($data = file_get_contents($url)) ) return false; if( preg_match(&#8220;#&#60;title&#62;(.+)&#60;\/title&#62;#iU&#8221;, $data, $t))  { return trim($t[1]); } else { return false; } } ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=27&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;?php<br />
$url=&#8221;http://example.com&#8221;;<br />
echo getTitle($url);</p>
<p>function get_page_title($url)</p>
<p>{</p>
<p>if( !($data = file_get_contents($url)) ) return false;</p>
<p>if( preg_match(&#8220;#&lt;title&gt;(.+)&lt;\/title&gt;#iU&#8221;, $data, $t))  {<br />
return trim($t[1]);<br />
}</p>
<p>else</p>
<p>{<br />
return false;<br />
}<br />
}</p>
<p>?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=27&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
		<item>
		<title>Get Title of a Webpage using PHP &#8211; 1</title>
		<link>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-1/</link>
		<comments>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-1/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 17:56:02 +0000</pubDate>
		<dc:creator>KB</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://basiccodes.wordpress.com/?p=24</guid>
		<description><![CDATA[&#60;?php function getTitle($Url){ $str = file_get_contents($Url); if(strlen($str)&#62;0){ preg_match(&#8220;/\&#60;title\&#62;(.*)\&#60;\/title\&#62;/&#8221;,$str,$title); return $title[1]; } } $url=&#8221;http://example.com&#8221;; echo getTitle($url); ?&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=24&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;?php</p>
<p>function getTitle($Url){<br />
$str = file_get_contents($Url);<br />
if(strlen($str)&gt;0){<br />
preg_match(&#8220;/\&lt;title\&gt;(.*)\&lt;\/title\&gt;/&#8221;,$str,$title);<br />
return $title[1];<br />
}<br />
}</p>
<p>$url=&#8221;http://example.com&#8221;;<br />
echo getTitle($url);<br />
?&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/basiccodes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/basiccodes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/basiccodes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/basiccodes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/basiccodes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/basiccodes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/basiccodes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/basiccodes.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=basiccodes.wordpress.com&amp;blog=14610176&amp;post=24&amp;subd=basiccodes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://basiccodes.wordpress.com/2010/07/10/get-title-of-a-webpage-using-php-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d49ed5a3f944f94d58964cb46d25788a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KB</media:title>
		</media:content>
	</item>
	</channel>
</rss>
