<?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/"
	>

<channel>
	<title>Geek is a lifestyle &#187; php</title>
	<atom:link href="http://blog.amanjain.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.amanjain.com</link>
	<description>Aman's Blog</description>
	<lastBuildDate>Wed, 06 Jan 2010 10:47:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHPCamp 2010 &#8211; What/When/Why/Where?</title>
		<link>http://blog.amanjain.com/2010/01/phpcamp-2010/</link>
		<comments>http://blog.amanjain.com/2010/01/phpcamp-2010/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 10:25:36 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[Camp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpcamp]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=289</guid>
		<description><![CDATA[What is PHPCamp?
&#160;
PHPCamp is a &#8216;ad-hoc gathering&#8217; for PHP community. It similar to barcamp, but more focused towards PHP based web application development.
It is targeting all the PHP enthusiast and starters to join this technical extravaganza this means that anyone can come to PHPCamp and participate.
&#160;&#160;
Why attend PHPCamp?
&#160;
Navin has the best answer: &#8220;Because learning from [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is PHPCamp?</strong><br />
&nbsp;<br />
PHPCamp is a &#8216;ad-hoc gathering&#8217; for PHP community. It similar to barcamp, but more focused towards PHP based web application development.<br />
It is targeting all the PHP enthusiast and starters to join this technical extravaganza this means that anyone can come to PHPCamp and participate.<br />
&nbsp;&nbsp;<br />
<strong>Why attend PHPCamp?</strong><br />
&nbsp;<br />
Navin has the best answer: &#8220;<a href="http://punetech.com/attend-phpcamp-9th-jan-because-learning-from-humans-is-much-better-than-google/" target="_blank">Because learning from humans is much better than Google</a>&#8221;<br />
&nbsp;&nbsp;<br />
<strong>But I am a student and I have classes&#8230;</strong><br />
&nbsp;<br />
<strong> </strong><a href="http://punetech.com/why-students-should-bunk-classes-to-attend-barcamppune-projects-internships-recos/" target="_blank">Here is why you should bunk classes to attend PHPCamp / BarcampPune: projects, internships, recosBarcamp?</a><br />
&nbsp;&nbsp;<br />
<strong>What to expect at PHPCamp?</strong><br />
&nbsp;<br />
Knowledge, Knowledge and Knowledge. Oh! did I miss Free T-Shirt, Adobe® Flex™ Builder 3 Pro (Licensed Copy)  along with &#8220;Getting started resources&#8221; ( CD also includes lot of &#8220;Raffles&#8221; ) and of course you could be an &#8220;<strong>Expert</strong>&#8221; in 8 hours.<br />
&nbsp;&nbsp;<br />
<strong>When and Where?</strong><br />
&nbsp;<br />
<strong>Venue:</strong> SCDL(Symbiosis Center for Distance Learning), Pune<br />
<strong>Time: </strong>9AM &#8211; 5PM. ( Please reach 15 mins prior )<br />
<strong>Landmark</strong>: 3-5 mins walk from OM Super Market(Groceries Shop) / <a rel="nofollow" href="http://sicsr.ac.in/">SICSR College</a><br />
&nbsp;&nbsp;<br />
Register ASAP: <a style="color: #3c78a7; text-decoration: none; padding: 0px; margin: 0px;" href="http://phpcamp.eventbrite.com/" target="_blank">http://phpcamp.eventbrite.com/</a> <strong>The number of allowed participants are limited, we have already increased the number twice.</strong><br />
&nbsp;&nbsp;<br />
<strong>Event Website:</strong><span style="padding: 0px; margin: 0px;"> <a href="http://phpcamp.org" target="_blank">http://phpcamp.org</a></span><br />
&nbsp;&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2010/01/phpcamp-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making mail() function of PHP work under windows os</title>
		<link>http://blog.amanjain.com/2009/09/making-mail-function-of-php-work-under-windows-os/</link>
		<comments>http://blog.amanjain.com/2009/09/making-mail-function-of-php-work-under-windows-os/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 05:24:52 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=255</guid>
		<description><![CDATA[mail() is a useful function in PHP for sending mails, but many developers face problems in making mail() work properly on Windows.

In the section [mail function] in the php.ini file, you&#8217;ll find three settings:
SMTP, sendmail_from, and sendmail_path.

If your server runs on a Windows machine, you&#8217;ll have to set the SMTP option to point to your [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #800080;">mail()</span> is a useful function in <span style="color: #800080;">PHP</span> for sending mails, but many developers face problems in making mail() work properly on Windows.<br />
<br/><br />
In the section <span style="color: #800080;">[mail function]</span> in the <span style="color: #800080;">php.ini</span> file, you&#8217;ll find three settings:<br />
<span style="color: #800080;">SMTP</span>, <span style="color: #800080;">sendmail_from</span>, and <span style="color: #800080;">sendmail_path</span>.<br />
<br/><br />
If your server runs on a <span style="color: #800080;">Windows</span> machine, you&#8217;ll have to set the SMTP option to point to your SMTP server for sending mail using PHP.<br />
<br/><br />
So, we must understand that PHP must have the address of some SMTP server where it would deliver the mail to be sent and that is all PHP can actually do.<br />
<br/><br />
So, we need  to set SMTP to the SMTP server and the sendmail_from option to the required email address.<br />
Now if we want to use <span style="color: #800080;">localhost</span> as the <span style="color: #800080;">SMTP server</span>, we must have some SMTP server running on our system, simple isn&#8217;t it?  So we can download and install <span style="color: #800080;">hMailServer</span> from <a href="http://www.hmailserver.com/">www.hmailserver.com</a>/ for serving our purpose.<br />
<br/><br />
After installing the mail server make sure that you<span style="color: #800080;"> switch off  SMTP authentication for connections coming from localhost / 127.0.0.1</span> in hMailServer for your mail() function to work.<br />
<br/><br />
And this is how <span style="color: #800080;">[mail function] </span>part of your php.ini should look:<br />
<br/><br />
[mail function]<br />
; Setup for Windows systems<br />
SMTP = localhost<br />
sendmail_from = me@mydomain.tld</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2009/09/making-mail-function-of-php-work-under-windows-os/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create database backup &amp; email using php</title>
		<link>http://blog.amanjain.com/2009/02/create-database-backup-email-using-php/</link>
		<comments>http://blog.amanjain.com/2009/02/create-database-backup-email-using-php/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 15:40:33 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=198</guid>
		<description><![CDATA[It is generally difficult to backup our database regularly and store them. With more and more storage space being provided by our email providers, we can write a script that can be called when required and it will automatically create database backup and mail it to the specified email.
The following zip contains two files:
1. ajDbBackup.class
2. [...]]]></description>
			<content:encoded><![CDATA[<p>It is generally difficult to backup our database regularly and store them. With more and more storage space being provided by our email providers, we can write a script that can be called when required and it will automatically create database backup and mail it to the specified email.</p>
<p>The following <a href="http://blog.amanjain.com/wp-content/uploads/2009/02/ajdbbackup1.zip">zip</a> contains two files:<br />
1. ajDbBackup.class<br />
2. backup.php</p>
<p>ajDbBackup.class file contains the ajDbBackup class which can be used to backup the database. An example of usage is given in file backup.php .<br />
To email backup create a php file in the same directory where ajDbBackup.class is kept with the following data:<br />
&lt;?php<br />
include &#8216;./ajDbBackup.class&#8217;;<br />
$backup = new ajDbBackup;<br />
$backup-&gt;emailTo = &#8220;email@domain.tld&#8221;;<br />
$backup-&gt;emailFrom = &#8220;emailTwo@domain.tld&#8221;;<br />
$backup-&gt;host = &#8220;mysqlHost&#8221;;<br />
$backup-&gt;user = &#8220;mysqlUser&#8221;;<br />
$backup-&gt;password = &#8220;mysqlUserPassword&#8221;;<br />
$backup-&gt;dbName = &#8220;mysqlDbNameToBeBacked&#8221;;<br />
$backup-&gt;ajMail();<br />
?&gt;</p>
<p>Give execution and read/write permissions to the files. Just call the file you have created through any web browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2009/02/create-database-backup-email-using-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Announcing PHPCamp.net</title>
		<link>http://blog.amanjain.com/2009/01/announcing-phpcamp/</link>
		<comments>http://blog.amanjain.com/2009/01/announcing-phpcamp/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 05:53:54 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpcamp]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=185</guid>
		<description><![CDATA[It is my pleasure to let you know that most awaited PHPCamp.net is now launched.
I am happy to give you an early invite to join PHPCamp.net- a site dedicated to our PHP community.
It&#8217;s just not yet another website for campers but much more to it.
In words of Denham Grey:
&#8220;Knowledge is embodied in people gathered in communities [...]]]></description>
			<content:encoded><![CDATA[<p>It is my pleasure to let you know that most awaited PHPCamp.net is now launched.</p>
<p>I am happy to give you an early invite to <a href="http://phpcamp.net/become-a-camper" target="_blank">join PHPCamp.net</a>- a site dedicated to our PHP community.</p>
<p>It&#8217;s just not yet another website for campers but much more to it.</p>
<p>In words of Denham Grey:<br />
<em>&#8220;Knowledge is embodied in people gathered in communities and networks. The road to knowledge is via people, conversations, connections and relationships. Knowledge surfaces through dialog, all knowledge is socially mediated and access to knowledge is by connecting to people that know or know who to contact.&#8221;</em></p>
<p>The aim of PHPCamp.net is to bring together all the PHP developers and share knowledge with each other by posting articles, comments, news, events, happenings and much more. It is easy to use, has a friendly UI and above all provides a platform where all campers could build contacts with each other.<br />
This stands our one more contribution to the PHP community.</p>
<p>Just click on <a href="http://phpcamp.net/" target="_blank">http://phpcamp.net/</a> and start reading the latest articles contributed by the campers.</p>
<p>I look forward to see you soon on <a href="http://phpcamp.net/" target="_blank">PHPCamp.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2009/01/announcing-phpcamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fetch twitter updates via PHP</title>
		<link>http://blog.amanjain.com/2009/01/fetch-twitter-updates-via-php/</link>
		<comments>http://blog.amanjain.com/2009/01/fetch-twitter-updates-via-php/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 06:40:51 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[XML]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=120</guid>
		<description><![CDATA[Want to display your (or maybe be someone else&#8217;s) public timeline using php? Ok, here&#8217;s the solution for it:
&#60;?php
$username = &#8220;amanjain&#8221;;
$rssUrl = &#8220;http://twitter.com/statuses/user_timeline/$username.rss&#8221;;
$rss = @file_get_contents($rssUrl);
if($rss)
{
$xml = @simplexml_load_string($rss);
if($xml !== false)
{
foreach($xml-&#62;channel-&#62;item as $tweet)
{
echo $tweet-&#62;pubDate.&#8221;\n&#8221;;
echo substr($tweet-&#62;description,10).&#8221;\n\n&#8221;;
}
}
else
{
echo &#8220;Error: RSS file not valid!&#8221;;
}
}
else
{
echo &#8220;Error: RSS file not found, dude. Username invalid or requires authentication&#8221;;
}
?&#62;
Find the script live here: http://blog.amanjain.com/twitter
]]></description>
			<content:encoded><![CDATA[<p>Want to display your (or maybe be someone else&#8217;s) public timeline using php? Ok, here&#8217;s the solution for it:</p>
<p>&lt;?php<br />
$username = &#8220;amanjain&#8221;;<br />
$rssUrl = &#8220;http://twitter.com/statuses/user_timeline/$username.rss&#8221;;<br />
$rss = @file_get_contents($rssUrl);</p>
<p>if($rss)<br />
{<br />
$xml = @simplexml_load_string($rss);<span id="more-120"></span><br />
if($xml !== false)<br />
{<br />
foreach($xml-&gt;channel-&gt;item as $tweet)<br />
{<br />
echo $tweet-&gt;pubDate.&#8221;\n&#8221;;<br />
echo substr($tweet-&gt;description,10).&#8221;\n\n&#8221;;<br />
}<br />
}<br />
else<br />
{<br />
echo &#8220;Error: RSS file not valid!&#8221;;<br />
}<br />
}<br />
else<br />
{<br />
echo &#8220;Error: RSS file not found, dude. Username invalid or requires authentication&#8221;;<br />
}<br />
?&gt;</p>
<p><strong>Find the script live here: <a title="Aman's Twitter Updates" href="http://blog.amanjain.com/twitter" target="_blank">http://blog.amanjain.com/twitter</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2009/01/fetch-twitter-updates-via-php/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>php code to get Google pagerank</title>
		<link>http://blog.amanjain.com/2008/12/php-google-pagerank/</link>
		<comments>http://blog.amanjain.com/2008/12/php-google-pagerank/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 17:38:51 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Google pagerank]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=87</guid>
		<description><![CDATA[While reading about SEO ( Search engine optimization ) on various blogs and forums. I found people willing to know the procedure of getting their website&#8217;s  Google Pagerank through php. Searching more about it and then following the Google toolbar which give&#8217;s the google pagerank, I got the way of getting google page rank of [...]]]></description>
			<content:encoded><![CDATA[<p>While reading about <strong><a title="Search Engine Optimization" rel="nofollow" href="http://en.wikipedia.org/wiki/Search_engine_optimization" target="_blank">SEO ( Search engine optimization )</a></strong> on various blogs and forums. I found people willing to know the procedure of getting their website&#8217;s  <strong>Google Pagerank</strong> through php. Searching more about it and then following the Google toolbar which give&#8217;s the google pagerank, I got the way of getting google page rank of any website through php.</p>
<p>You can download the script <a title="pagerank code" rel="nofollow" href="http://blog.amanjain.com/wp-content/uploads/2008/12/pagerankcode.txt" target="_blank">here</a>. To use the script type:<br />
<em><strong> http://scriptLocation/scriptName.ext?url=domainName.ext</strong></em></p>
<p><span style="color: #ff0000;"><em><strong>Note:</strong></em></span></p>
<p>A: pagerank is given on a scale of 10.<br />
B: If you get no output then your page is not ranked by Google yet.<br />
C: Zero (0), can be your pagerank.<br />
D: I have no idea, if this is legal to extract this data through automated scripts. Please do not blame me if in case you face a problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2008/12/php-google-pagerank/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Parse XML with php</title>
		<link>http://blog.amanjain.com/2008/12/xml-php/</link>
		<comments>http://blog.amanjain.com/2008/12/xml-php/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 08:41:05 +0000</pubDate>
		<dc:creator>Aman</dc:creator>
				<category><![CDATA[XML]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.amanjain.com/?p=22</guid>
		<description><![CDATA[Times may come when you want to parse an XML page with php .. or read feeds with php. &#8220;So, how to do it ?&#8221; .. is the question..
Here&#8217;s it:
$fileURL = &#8220;./fileName.xml&#8221;;  //Specify the path(or Link of the xml file. )
$string = file_get_contents($fileURL);  //This will load the wole content of xml file into the variable.
$xml [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-23" title="xml php" src="http://blog.amanjain.com/wp-content/uploads/2008/12/xmllogo-300x180.png" alt="xml php" width="210" height="81" />Times may come when you want to parse an XML page with php .. or read feeds with php. &#8220;So, how to do it ?&#8221; .. is the question..</p>
<p>Here&#8217;s it:</p>
<p>$fileURL = &#8220;./fileName.xml&#8221;;  //Specify the path(or Link of the xml file. )<br />
$string = file_get_contents($fileURL);  //This will load the wole content of xml file into the variable.<br />
$xml = simplexml_load_string($string);  //simplexml_load_string, loads the data inform of an object or returns false if there is a problem in xml</p>
<p>if($xml !== false) //checks weather xml was sucessfully loaded<br />
{</p>
<p>//now suppose we want to list down all the attributes of tag <strong>FIRST ModulePrefs</strong> tag i.e &lt;ModulePrefs &#8230;. &gt;&lt;/&#8230;&gt;<br />
foreach($xml-&gt;ModulePrefs[0]-&gt;attributes() as $a =&gt; $b)  \\ [0] means the first ModulePrefs tag<br />
{<br />
echo $a = $b \\here $a is the attribute and $b is the value.<br />
}<br />
}</p>
<p>Easy isn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.amanjain.com/2008/12/xml-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
