<?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>Phpwala&#039;s Thoughts</title>
	<atom:link href="http://phpwala.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpwala.wordpress.com</link>
	<description>You can do a lot with php</description>
	<lastBuildDate>Tue, 20 Dec 2011 23:09:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='phpwala.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/4566ec78daaba7ae50d5eb7c1ff9b6f0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Phpwala&#039;s Thoughts</title>
		<link>http://phpwala.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://phpwala.wordpress.com/osd.xml" title="Phpwala&#039;s Thoughts" />
	<atom:link rel='hub' href='http://phpwala.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Testing!</title>
		<link>http://phpwala.wordpress.com/2011/12/20/testing/</link>
		<comments>http://phpwala.wordpress.com/2011/12/20/testing/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 23:09:27 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/2011/12/20/testing/</guid>
		<description><![CDATA[ChristmasCarnivals Team<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=167&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>ChristmasCarnivals Team</strong><br />
<img src="http://ts1.in/snap/12345" alt="12345" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=167&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2011/12/20/testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>

		<media:content url="http://ts1.in/snap/12345" medium="image">
			<media:title type="html">12345</media:title>
		</media:content>
	</item>
		<item>
		<title>Post your tweet from twitter api and php</title>
		<link>http://phpwala.wordpress.com/2010/03/11/post-your-tweet-from-twitter-api-and-php/</link>
		<comments>http://phpwala.wordpress.com/2010/03/11/post-your-tweet-from-twitter-api-and-php/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:13:02 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitter API]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/?p=155</guid>
		<description><![CDATA[Twitter is the new social media sensational and many application developers want to add twitter with their site. Many times application developers want to send their updates,users comment and other information to twitter from their application. Twitter provides API to use its services. Here I give you a very simple function that can post your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=155&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Twitter is the new social media sensational and many application developers want to add twitter with their site. Many times application developers want to send their  updates,users comment and other information to twitter from their application. Twitter provides API to use its services. </p>
<p>Here I give you a very simple function that can post your tweet from your application to twitter. This uses cURL.</p>
<p>function postToTwitter($twitterusername,$twitterpassword,$tweet)<br />
{<br />
    $host = &#8220;http://twitter.com/statuses/update.xml?status=&#8221;.urlencode(stripslashes(urldecode($tweet)));</p>
<p>    $ch = curl_init();<br />
    curl_setopt($ch, CURLOPT_URL, $host);<br />
    curl_setopt($ch, CURLOPT_VERBOSE, 1);<br />
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
    curl_setopt($ch, CURLOPT_USERPWD, &#8220;$twitterusername:$twitterpassword&#8221;);<br />
    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);<br />
    curl_setopt($ch, CURLOPT_POST, 1);</p>
<p>    $result = curl_exec($ch);<br />
    // Look at the returned header<br />
    $resultArray = curl_getinfo($ch);</p>
<p>    curl_close($ch);</p>
<p>    if($resultArray['http_code'] == &#8220;200&#8243;)<br />
{</p>
<p>    $status=true;<br />
    }<br />
else {</p>
<p>        $status=false;</p>
<p>}<br />
return $status;<br />
}</p>
<p>This function posts your tweet successfully with the signature API on twitter.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=155&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2010/03/11/post-your-tweet-from-twitter-api-and-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Submit Sitemap Dynamically In Search Engines</title>
		<link>http://phpwala.wordpress.com/2010/03/10/submit-sitemap-dynamically-in-search-engines/</link>
		<comments>http://phpwala.wordpress.com/2010/03/10/submit-sitemap-dynamically-in-search-engines/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 19:20:22 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/?p=149</guid>
		<description><![CDATA[You know how to submit sitemap of your website in google. Most of the time you do this with your Google Webmaster Tool. You create a google account and use this service. Every time when your sitemap updates you have to resubmit the sitemap manually. Google provides a very easy method to make your task [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=149&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You know how to submit sitemap of your website in google. Most of the time you do this with your Google Webmaster Tool. You create a google account and use this service. Every time when your sitemap updates you have to resubmit the sitemap manually.<br />
Google provides a very easy method to make your task easy. You just submit your sitemap at once (First time) in Google webmaster , and for resubmitting you can invoke the following URL </p>
<p><strong>www.google.com/webmasters/tools/ping?sitemap=http://example.com/sitemap.xml</strong></p>
<p>You can invoke this URL via any PHP program whenever your sitemap updates. </p>
<p>This method is very useful when you deal with dynamic sites where sitemap is automatically generated. Most of the CMS (like drupal) uses above method for resubmitting the sitemap. </p>
<p>The URL shown above is a standard form of sitemap submission in search engines and most of the popular search engines follow this. For example if you have to submit your sitemap in BING just invoke the following URL<br />
  <strong>http://www.bing.com/webmaster/ping.aspx?sitemap=http://example.com/sitemap.xml</strong></p>
<p>Similarly for ASK.com<br />
<strong></p>
<p>http://submissions.ask.com/ping?sitemap=http://example.com/sitemap.xml</strong></p>
<p>And for yahoo<br />
<strong></p>
<p>http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=http://example.com/sitemap.xml</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=149&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2010/03/10/submit-sitemap-dynamically-in-search-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Database engines in MySQL. MyISAM and InnoDB</title>
		<link>http://phpwala.wordpress.com/2009/11/23/database-engines-in-mysql-myisam-and-innodb/</link>
		<comments>http://phpwala.wordpress.com/2009/11/23/database-engines-in-mysql-myisam-and-innodb/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 14:39:33 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[MyISAM]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/?p=45</guid>
		<description><![CDATA[What is a Database Engine? A database engine is basically a software layer in every DBMS that creates table, updates them and retrieves information from them. Since data and database may be of different natures MySQL DBMS provides several kinds of DBMS engines. We discuss two of them, that are most popular- 1)MyISAM MyISAM is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=45&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What is a Database Engine? </strong><br />
<em>A database engine is basically a software layer in every DBMS that creates table, updates them and retrieves information from them. </em>  Since data and database may be of different natures MySQL DBMS provides several kinds of DBMS engines. We discuss  two of them, that are most popular-   </p>
<p><strong>1)MyISAM   </strong>      </p>
<p>MyISAM is the default database engine of MySQL, that is based on ISAM (Index Sequential Access Method). ISAM was developed by IBM for fast retrieval of data in Mainframe Computers. MyISAM is fast in data access and supports full text searching.   The limitation of this is, MyISAM is not suitable for transactional tables or it does not support foreign key constraints. (i.e. referential integrities). This is poor in crash recovery also.                 MyISAM locks the table until the operation is not complete. For example if you are inserting a row, the next operation say ‘updating of row ‘will wait until the first finishes.   </p>
<p> <strong>2) InnoDB  </strong>          </p>
<p> InnoDB  is more safe database engine of MySQL. InnoDB is good for transactional tables. It supports foreign key constraints. COMMIT, ROLLBACK sort of operations can be performed in this engine. Crash recovery is more easy in this. This stores data in clustered indexes (Storing the rows in primary key order while<em> MyISAM stores the rows as they added</em>).      InnoDB is designed for large volume of data for high performance. This is also good for multi-user concurrency.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=45&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2009/11/23/database-engines-in-mysql-myisam-and-innodb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to write file  without 777 permission</title>
		<link>http://phpwala.wordpress.com/2009/11/15/how-to-write-file-though-ftp-in-php-without-777-permission/</link>
		<comments>http://phpwala.wordpress.com/2009/11/15/how-to-write-file-though-ftp-in-php-without-777-permission/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 11:27:10 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[777]]></category>
		<category><![CDATA[file writing]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[secure file writing]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/?p=35</guid>
		<description><![CDATA[File writing is a very important part in PHP programming. We need to do this many time.  Every time when you do this, you need to give  777 permission to the directory  in which you are going to write the file.By this you become eligible for creating , writing,reading and deleting the file by your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=35&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>File writing is a very important part in PHP programming. We need to do this many time.  Every time when you do this, you need to give  777 permission to the directory  in which you are going to write the file.By this you become eligible for creating , writing,reading and deleting the file by your PHP code.  This is not a secure way. Giving this permission to any of you directory can create big security problems. And of course your server guys will never suggest you to do this.</p>
<p>So what to do &#8211; Either go for less featured permissions (775 , 770 etc) but they have their own restrictions. Here I give you a way to write  the file without bothering of your directory permissions. This way is to write file through FTP. PHP has a strong collection of FTP functions that are very useful in file writing. With the help of this you can easily write your file without fighting with your server guys for specific permissions.</p>
<p>Here is the code of file writing though PHP..</p>
<p>&lt;?php</p>
<p>/*<br />
################################# File Writing Through FTP ##########################<br />
Subject      :File writing through FTP (An alternative of 777 permission )<br />
Developed By :Hitesh Mathpal<br />
E mail       :hitesh.mathpal@gmail.com</p>
<p>*/</p>
<p>Class ftpUtility<br />
{</p>
<p>/*<br />
* variable declarations<br />
*/</p>
<p>var $ftpHost;<br />
var $ftpUser;<br />
var $ftpPassword;<br />
var $ftpstream;</p>
<p>/*<br />
* @param1 is the name of the FTP Host where you want to write the file<br />
* @param2 is the user name of the FTP Host where you want to write the file<br />
* @param3 is the password of the FTP Host where you want to write the file<br />
*/</p>
<p>function __construct($host,$user,$pass)<br />
{<br />
$this-&gt;ftpHost=$host;<br />
$this-&gt;ftpUser=$user;<br />
$this-&gt;ftpPassword=$pass;<br />
$this-&gt;ftpstream=ftp_connect($this-&gt;ftpHost);</p>
<p>}</p>
<p>/*<br />
Checks the FTP connection.<br />
*/</p>
<p>function checkFTP()<br />
{</p>
<p>if(ftp_login($this-&gt;ftpstream, $this-&gt;ftpUser,$this-&gt;ftpPassword))<br />
return true;<br />
else<br />
return false;</p>
<p>}</p>
<p>/*<br />
/*@Param1 is the path where you want to write the file<br />
/*@Param2 is the content that is to be written in the file</p>
<p>*/</p>
<p>function ftpWrite($filePath,$content)<br />
{<br />
$temp = tmpfile();<br />
fwrite($temp,$content);<br />
fseek($temp,0);</p>
<p>$upload=ftp_fput($this-&gt;ftpstream, $filePath,$temp,FTP_BINARY);</p>
<p>if($upload)<br />
return true;<br />
else<br />
return false;</p>
<p>}</p>
<p>/* Close FTP stream */<br />
function ftpclose()<br />
{<br />
ftp_close($this-&gt;ftpstream);<br />
}</p>
<p>}</p>
<p>############################################### File Writing #########################################</p>
<p>$ftpHost=&#8221;www.example.com&#8221;;<br />
$ftpUser=&#8221;XXXXXXXXXXXXXXXXXXX&#8221;;<br />
$ftpPassword=&#8221;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#8221;;<br />
$filePath = &#8220;public_html/testing/myfile.txt&#8221;;<br />
$content=&#8221;My FTP test&#8221;;</p>
<p>$ftp=new ftpUtility();</p>
<p>if($ftp-&gt;checkFTP())<br />
{</p>
<p>if($ftp-&gt;ftpWrite($filePath,$content))<br />
echo &#8220;Cheers! Check your file!&#8221;;<br />
else<br />
echo &#8220;Error: Try again.&#8221;;</p>
<p>}<br />
$ftp-&gt;ftpclose();</p>
<p>?&gt;</p>
<p><strong>NOTE:</strong> You can use either the FTP details of root or can create separate FTP credentials of the directory in which you wanna perform the action (Your server guys can help you in second option)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=35&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2009/11/15/how-to-write-file-though-ftp-in-php-without-777-permission/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to post photos in flickr through API and PHP</title>
		<link>http://phpwala.wordpress.com/2009/11/06/how-to-post-photos-in-flickr-through-api-and-php/</link>
		<comments>http://phpwala.wordpress.com/2009/11/06/how-to-post-photos-in-flickr-through-api-and-php/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 11:29:38 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/?p=22</guid>
		<description><![CDATA[Hi All, Now its very easy to upload photos in flickr from your own site or application.  This can be done through the help of  phpFlickr class.  This can be downloaded from http://phpflickr.com or directlink for downloading  is http://code.google.com/p/phpflickr/downloads/list Including this class in following code you can easily upload images in your flickr account. &#60;?php [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=22&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi All,</p>
<p>Now its very easy to upload photos in flickr from your own site or application.  This can be done through the help of  phpFlickr class.  This can be downloaded from <a title="http://phpflickr.com" href="http://phpflickr.com" target="_blank">http://phpflickr.com</a> or directlink for downloading  is <a title="http://code.google.com/p/phpflickr/downloads/list" href="http://code.google.com/p/phpflickr/downloads/list" target="_blank">http://code.google.com/p/phpflickr/downloads/list</a></p>
<p>Including this class in following code you can easily upload images in your flickr account.</p>
<p>&lt;?php<br />
include(&#8220;phpFlickr.php&#8221;);</p>
<p>$api_key= &#8220;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#8221;;</p>
<p>$api_secret= &#8220;XXXXXXXXXXXX&#8221;;</p>
<p>$flickr = new phpFlickr($api_key, $api_secret,true);</p>
<p>$flickr-&gt;auth(&#8220;write&#8221;);</p>
<p>//you can use relative path here too like /home/example/public_html/snaps/a.jpg<br />
$path=&#8221;a.jpg&#8221;;</p>
<p>$response=$flickr-&gt;sync_uploa d(&#8220;$path&#8221;,&#8221;put your description here&#8221;,&#8221;mytag1,mytag2&#8243;,1,1,1);</p>
<p>//returns the id of the image that is posted in flickr<br />
if($response)<br />
{<br />
header(&#8220;Location:http://flickr.com&#8221;);<br />
exit();<br />
}</p>
<p>?&gt;</p>
<p>While executing this code, flickr  asks you for a yahoo login (If not logged in).After login it  asks  you to allow the application to access your flickr accaount. Once you allow this, the image is posted in flickr and the script gives you the image id of the posted image.</p>
<p>Then it redirects you to the flickr to show the picture you posted.</p>
<p>Thanks!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=22&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2009/11/06/how-to-post-photos-in-flickr-through-api-and-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to develop a twitter application through twitter API</title>
		<link>http://phpwala.wordpress.com/2009/08/08/how-to-develop-a-twitter-application-through-twitter-api/</link>
		<comments>http://phpwala.wordpress.com/2009/08/08/how-to-develop-a-twitter-application-through-twitter-api/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 09:25:22 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[PHP API]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitter API]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/?p=16</guid>
		<description><![CDATA[Since, twitter has changed the world of Internet and of course it has given a new way of application development. Now you can easily develop an application for twitter and use twitter&#8217;s user base to promote your application. Since twitter has great traffic ,you can easily take the advantage of it. The best examples of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=16&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom:0;">Since, twitter has changed the world of Internet and of course it has given a new way of application development. Now you can easily develop an application for twitter and use twitter&#8217;s user base to promote your application. Since twitter has great traffic ,you can easily take the advantage of it. The best examples of this are twitpic, twitsnaps, digsby,twitterfeed,twhirl etc. To develop a killer twitter application you need two things essentially.</p>
<p style="margin-bottom:0;">1)A unique idea</p>
<p style="margin-bottom:0;">2)Twitter&#8217;s API <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">So idea is yours and API is of twitter, and I tell you how to use it.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Twitter has two kinds of APIs.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">1)Non Oauth</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">2)Ouath</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Before discussing on APIs, I just explain you first what is Oauth. Oauth is basically an <strong>open protocol</strong> to allow <strong>secure API authorization </strong>in a <strong>simple</strong> and <strong>standard</strong> method from desktop and web applications.Oauth came in existence in 2006 and twitter adopted this in the early of 2009. Previously twitter has non oauth APIs. Most of the famous twitter applications are developed in this. You can use this for such APIs  http://uurl.in/Haw2i</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">In Non Oauth APIs you directly need the user information like userid,password to access the features. If you are using such APIs user&#8217;s twitter login credentials are in your control. You can save them. Like in case of twitpic you give your twitter userid and password to twitpic. Twitpic may save it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .Such APIs need user&#8217;s exact userid and password to access them properly.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">In Oauth APIs you need an authentication token that will be given  from twitter only. For such applications you will have to register yourself with twitter. After registration,twitter will give you a Consumer Key and Consumer Secret Key. That you need to use in your source code. In these applications an authentification url is given by twitter to login. When user clicks on that login url , it takes user to twitter where user has to enter his userid and password, if it successful then twitter redirects it to your callback URL (url of your application,that you define when  you register with twitter) along with a unique oauth token. On the basis of that token you can use the API to access its features. This is considerd as secure from user&#8217;s point of view because user&#8217;s login information is secure and you can not catch it.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">Now most of the users prefer oauth based applications. But still twitter&#8217;s Oauth API is not as good as its Non Oauth API for desktop or mobile applications.Since they are improving this.</p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">You can register your application for Oauth from <a href="http://twitter.com/oauth_clients">http://twitter.com/oauth_clients</a></p>
<p style="margin-bottom:0;">And the help is available on <a href="http://apiwiki.twitter.com/OAuth-FAQ">http://apiwiki.twitter.com/OAuth-FAQ</a></p>
<p style="margin-bottom:0;">To know about Oauth visit <a href="http://oauth.net/">http://oauth.net/</a></p>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=16&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2009/08/08/how-to-develop-a-twitter-application-through-twitter-api/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
		<item>
		<title>What is best and economical  for website development..</title>
		<link>http://phpwala.wordpress.com/2009/06/24/what-is-best-and-economical-for-website-development/</link>
		<comments>http://phpwala.wordpress.com/2009/06/24/what-is-best-and-economical-for-website-development/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 14:11:00 +0000</pubDate>
		<dc:creator>Hitesh Mathpal</dc:creator>
				<category><![CDATA[marketing]]></category>
		<category><![CDATA[economical web design]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php vs asp]]></category>
		<category><![CDATA[php vs jsp]]></category>
		<category><![CDATA[web designing]]></category>

		<guid isPermaLink="false">http://phpwala.wordpress.com/2009/06/24/what-is-best-and-economical-for-website-development/</guid>
		<description><![CDATA[If you are planning to start a website, or wanting to enter in website business this post can be useful for you in terms of technology implementation. Technology plays a big role in web designing. You have many choices like ASP,JSP,PHP,PERL etc to develop your site. Here I tell you which one is the best [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=3&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are planning to start a website, or wanting to enter in website business this post can be useful for you in terms of technology implementation. Technology plays a big role in web designing. You have many choices like ASP,JSP,PHP,PERL etc to develop your site. Here I tell you which one is the best and why. Well, everyone wants less expenditure and more benefit. If you get a technology that is strong enough and economical too, you will definitely appreciate this. See , if  I say it economical I mean it in both the ways software costs as well as resources (Manpower, technical support etc).</p>
<p>Today there are  three main languages in market for web development. JSP,ASP and PHP.</p>
<p>We start with JSP. JSP is a very strong web scripting that has a backup of JAVA. JSP is no doubt a good one in terms of technology. Since JSP is nothing but the scripting form of JAVA, it has proven itself in last many years. But since the complexity of JAVA is increasing day by day , development  complexity is also increasing accordingly. Since the technology is free but the human resource is always very costly in comparison to  others. And as I already mentioned it is complex too, so your development time increases comparatively others.</p>
<p>The next is ASP.</p>
<p>This is a Microsoft product so not free obviously. It runs on IIS server that is not free. This is costly in terms of DB connectivity because MS-SQL that is the database with ASP is not free. Technically it is strong and human resource is available at average cost.The installation and set up  complexities are also there.</p>
<p>Now we come on PHP. PHP is dominating the website market. The language is absolutely free and very simple to learn. It runs on APACHE server that is also free. PHP is  smart enough to solve your problems and compatible with all platforms. PHP has made the fact that website programming is not a Rocket Science. There is a big on line support available for PHP. If we talk about technology PHP is a robust web scripting language. This  can run on browsers  as well as command line.  PHP  is Object Oriented that wides its scope of problem solving. It is good with all database servers but the best combination with MySQL (That is also a free DBMS from Sun). There is a great range of on line support of PHP like communities, open forums etc.</p>
<p>In terms of development complexity PHP is far better than others. This is an  easy learning language. The human resource is also economical. Since PHP is easy to learn so no big Computer Science degree required for this. Basically C is the base of PHP.Most of its syntax are similar to C. This is equipped with a lots of frameworks and CMS that makes your work easier and economical like  JOOMLA ,DRUPAL. These frameworks are free and save your development time as well. They are secure and can be customized easily. Some e commerce packages like OS Commerce is a proven package of e commerce site and secure for payment gateways.</p>
<p>PHP is growing too fast and a lots of web developers using this. Till April 2007 over 20 million   Internet  domains were in PHP. The numbers are increasing rapidly.</p>
<p>Some of the developments of PHP are <em>Yahoo.com, facebook.com, wikipedia.com ,youtube.com,  digg.com.  wordpress.com, naukri.com</em> etc. These name are enough to fix your choices.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/phpwala.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/phpwala.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/phpwala.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/phpwala.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/phpwala.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/phpwala.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/phpwala.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/phpwala.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=phpwala.wordpress.com&amp;blog=8244156&amp;post=3&amp;subd=phpwala&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://phpwala.wordpress.com/2009/06/24/what-is-best-and-economical-for-website-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2aea88c2c237018490765bb571e0e60?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Hitesh</media:title>
		</media:content>
	</item>
	</channel>
</rss>
