<?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>vijayjoshi.org &#187; PHP</title>
	<atom:link href="http://www.vijayjoshi.org/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vijayjoshi.org</link>
	<description>php &#124; javascript &#124; ajax &#124; and all things web</description>
	<lastBuildDate>Sun, 20 Nov 2011 15:24:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Book Review: Mastering phpMyAdmin 3.3.x for Effective MySQL Management</title>
		<link>http://www.vijayjoshi.org/2011/02/10/book-review-mastering-phpmyadmin-3-3-x-for-effective-mysql-management/</link>
		<comments>http://www.vijayjoshi.org/2011/02/10/book-review-mastering-phpmyadmin-3-3-x-for-effective-mysql-management/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 05:46:15 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1200</guid>
		<description><![CDATA[
			
				
			
		
Recently I was contacted by Richard from Packt Publication to review their new book &#8220;Mastering phpMyAdmin 3.3.x for Effective MySQL Management&#8220;. Being a PHP-MySQL developer and an avid reader of technical books myself, I instantly agreed.
It took me a bit longer to read it then I had expected. At first, I had decided to just skim through the important chapters ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F02%2F10%2Fbook-review-mastering-phpmyadmin-3-3-x-for-effective-mysql-management%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F02%2F10%2Fbook-review-mastering-phpmyadmin-3-3-x-for-effective-mysql-management%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I was contacted by Richard from Packt Publication to review their new book &#8220;<strong><a title="phpMyAdmin Book" href="http://link.packtpub.com/K5JQ8I" target="_blank">Mastering phpMyAdmin 3.3.x for Effective MySQL Management</a></strong>&#8220;. Being a PHP-MySQL developer and an avid reader of technical books myself, I instantly agreed.</p>
<p>It took me a bit longer to read it then I had expected. At first, I had decided to just skim through the important chapters but it was interesting enough to change my decision. I then read all chapters one by one and realized that despite using phpMyAdmin on a daily basis, there is so much more to it that we developers are unaware of.</p>
<p>The author of this book is <strong>Marc Delisle</strong>, who is contributing to this project for more then 12 years. The book contains 19 chapters and 2 appendices. In my opinion the book can be divided broadly into 5 parts.</p>
<p style="text-align: center;"><a href="http://link.packtpub.com/K5JQ8I" target="_blank"><img class="aligncenter" title="Mastering phpMyAdmin 3.3x for Effective MySQL Management" src="https://www.packtpub.com/sites/default/files/3548OS_MockupCover.jpg" alt="" width="315" height="389" /></a></p>
<p><strong>Chapter 1 to Chapter 3</strong><br />
I will say these warm up chapters as they cover installation, configuration and overview of phpMyAdmin interface in detail. Experienced users may skip these but beginners should go through each one of them.</p>
<p><span id="more-1200"></span></p>
<p><strong>Chapter 4 to Chapter 7</strong><br />
These 4 chapters explain through data management i.e. creating database and table structures and import/export of data.</p>
<p><strong>Chapter 8 to Chapter 12</strong><br />
You will find all information on querying tables(including multiple table queries), table and database operations, creating relations and keys etc. I liked these chapters the most.</p>
<p><strong>Chapter 13 to Chapter 15</strong><br />
These chapters cover data synchronization, bookmarking and generation of printable reports and schemas from phpMyAdmin. Very useful chapters indeed, in case you want to synchronize data between 2 servers or you want the schemas printed or available in pdf format.</p>
<p><strong>Chapter 16 to Chapter 19</strong><br />
Chapters for advanced and experienced users, these explain data transformation, creating views, stored procedures, executing triggers etc. Chapter 18 is specifically for versioning and tracking database changes. Final chapter is all about administering the MySQL server with phpMyAdmin. All of these chapters are extremely useful.</p>
<p><strong>Conclusion</strong></p>
<p>Each chapter is explained in a detailed manner which sometimes seems too much, but thats my perspective, someone who has been using phpMyAdmin for more then 5-6 years now. Beginner and intermediate users will find those details useful and easy to understand.</p>
<p>Overall, I liked the book and learned about few things I did not know even existed. I will definitely recommend it. For new users of phpMyAdmin, it starts from beginner level and explains each task by breaking it down in steps. More advanced users may skip initial 5-6 chapters but later chapters will be definitely helpful for them.</p>
<p>You can see more details on this book at Packt&#8217;s website at <a title="phpMyAdmin Book" href="http://link.packtpub.com/K5JQ8I">this link</a> and buy at either Packt website or amazon.</p>
<div class="shr-publisher-1200"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F02%2F10%2Fbook-review-mastering-phpmyadmin-3-3-x-for-effective-mysql-management%2F' data-shr_title='Book+Review%3A+Mastering+phpMyAdmin+3.3.x+for+Effective+MySQL+Management'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/02/10/book-review-mastering-phpmyadmin-3-3-x-for-effective-mysql-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Favorite tech links of the week : 17 Jan – 23 Jan, 2011</title>
		<link>http://www.vijayjoshi.org/2011/01/24/favorite-tech-links-of-the-week-17-jan23-jan-2011/</link>
		<comments>http://www.vijayjoshi.org/2011/01/24/favorite-tech-links-of-the-week-17-jan23-jan-2011/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 06:09:00 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1169</guid>
		<description><![CDATA[
			
				
			
		
This post contains some of the useful and interesting tech links I found during last week. To keep up to date with the latest information, subscribe to the feed or follow me on twitter @v08i.
How to write a simple application on jQuery Mobile : http://goo.gl/5DpOO

50 Free Tools and Apps for Web Designers and Developers : http://goo.gl/6YjNL

10 Useful jQuery Plugins for Images : ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F24%2Ffavorite-tech-links-of-the-week-17-jan23-jan-2011%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F24%2Ffavorite-tech-links-of-the-week-17-jan23-jan-2011%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This post contains some of the useful and interesting tech links I found during last week. To keep up to date with the latest information, <a title="Subscribe" href="http://vijayjoshi.org/feed">subscribe to the feed</a> or follow me on twitter <a title="Follow me on Twitter" href="http://twitter.com/v08i">@v08i</a>.</p>
<h4>How to write a simple application on jQuery Mobile : <a href="http://goo.gl/526cL">http://goo.gl/5DpOO</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/526cL"><img class="aligncenter size-full wp-image-1170" title="jQuery Mobile" src="http://www.vijayjoshi.org/wp-content/uploads/jQueryMobile.png" alt="jQuery Mobile" /></a></p>
<h4>50 Free Tools and Apps for Web Designers and Developers : <a href="http://goo.gl/6YjNL">http://goo.gl/6YjNL</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/6YjNL"><img class="aligncenter size-full wp-image-1171" title="50 Free tools for developers" src="http://www.vijayjoshi.org/wp-content/uploads/50tools.png" alt="50 Free tools for developers" width="527" height="194" /></a></p>
<h4>10 Useful jQuery Plugins for Images : <a href="http://goo.gl/VTk1F">http://goo.gl/VTk1F</a></h4>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1172" title="jQuery Image Tools" src="http://www.vijayjoshi.org/wp-content/uploads/jQueryFaceDetection.png" alt="jQuery Image Tools" width="484" height="321" /></p>
<h4>20 less known Open Source PHP CMS-es : <a href="http://goo.gl/cM6f3">http://goo.gl/cM6f3</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/cM6f3"><img class="aligncenter size-full wp-image-1173" title="php Cms" src="http://www.vijayjoshi.org/wp-content/uploads/phpCmses.png" alt="php Cms" width="494" height="372" /></a></p>
<h4>11 More Things I Learned From the jQuery Source : <a href="http://goo.gl/2zBh7">http://goo.gl/2zBh7</a></h4>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/ARnp9Y8xgR4" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/ARnp9Y8xgR4"></embed></object></p>
<h4>CSSReset : All the most common CSS Reset scripts in one place : <a href="http://goo.gl/8OV9E">http://goo.gl/8OV9E</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/8OV9E"><img class="aligncenter size-full wp-image-1174" title="CSS Resets" src="http://www.vijayjoshi.org/wp-content/uploads/CSSResets.png" alt="CSS Resets" width="508" height="413" /></a></p>
<h4>JavaScript Slider – TinySlider 2 : <a href="http://goo.gl/526cL">http://goo.gl/526cL</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/526cL"><img class="aligncenter size-full wp-image-1175" title="js Slider" src="http://www.vijayjoshi.org/wp-content/uploads/jsSlider.png" alt="js Slider" width="482" height="193" /></a></p>
<div class="shr-publisher-1169"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F24%2Ffavorite-tech-links-of-the-week-17-jan23-jan-2011%2F' data-shr_title='Favorite+tech+links+of+the+week+%3A+17+Jan+%E2%80%93+23+Jan%2C+2011'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/24/favorite-tech-links-of-the-week-17-jan23-jan-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP class for expanding and shortening URLs using Google URL shortener API</title>
		<link>http://www.vijayjoshi.org/2011/01/21/php-class-for-expanding-and-shortening-urls-using-google-url-shortener-api/</link>
		<comments>http://www.vijayjoshi.org/2011/01/21/php-class-for-expanding-and-shortening-urls-using-google-url-shortener-api/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 19:55:14 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1156</guid>
		<description><![CDATA[
			
				
			
		
I have combined the 2 previous posts for expanding and shortening goo.gl URLs and have created a small class for it. Below is the download link for the class.

Expanding a URL
&#60;?php
include('GAPIClass.php');

$objAPI = new GAPIClass('your_api_key_here');
$result = $objAPI-&#62;expand('http://goo.gl/WlFX');
if(FALSE === $result)
{
	echo $objAPI-&#62;error;
}
else
{
	echo 'Long URL:'.$result;
}
?&#62;
Shorten A URL
&#60;?php
include('GAPIClass.php');

$objAPI = new GAPIClass('your_api_key_here');
$result = $objAPI-&#62;shorten('https://www.packtpub.com/php-jquery-cookbook-to-create-interactive-web-applications/book');

if(FALSE === $result)
{
	echo $objAPI-&#62;error;
}
else
{
	echo 'Short URL:'.$result;
}
?&#62;
As I have mentioned earlier that Google recommends ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F21%2Fphp-class-for-expanding-and-shortening-urls-using-google-url-shortener-api%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F21%2Fphp-class-for-expanding-and-shortening-urls-using-google-url-shortener-api%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I have combined the 2 previous posts for <a href="http://www.vijayjoshi.org/2011/01/12/using-php-and-curl-to-expand-urls-using-google-url-shortener-api/">expanding </a>and <a href="http://www.vijayjoshi.org/2011/01/12/php-shorten-urls-using-google-url-shortener-api/">shortening</a> goo.gl URLs and have created a small class for it. Below is the download link for the class.</p>
<p><a href="http://www.vijayjoshi.org/examples/GAPIClass.php.txt"><img class="aligncenter size-full wp-image-451" title="Download GAPIClass" src="http://www.vijayjoshi.org/wp-content/uploads/download.png" alt="Download GAPIClass" width="180" height="45" /></a></p>
<h4><span style="text-decoration: underline;">Expanding a URL</span></h4>
<pre class="brush:php">&lt;?php
include('GAPIClass.php');

$objAPI = new GAPIClass('your_api_key_here');
$result = $objAPI-&gt;expand('http://goo.gl/WlFX');
if(FALSE === $result)
{
	echo $objAPI-&gt;error;
}
else
{
	echo 'Long URL:'.$result;
}
?&gt;</pre>
<h4><span style="text-decoration: underline;">Shorten A URL</span></h4>
<pre class="brush:php">&lt;?php
include('GAPIClass.php');

$objAPI = new GAPIClass('your_api_key_here');
$result = $objAPI-&gt;shorten('https://www.packtpub.com/php-jquery-cookbook-to-create-interactive-web-applications/book');

if(FALSE === $result)
{
	echo $objAPI-&gt;error;
}
else
{
	echo 'Short URL:'.$result;
}
?&gt;</pre>
<p>As I have mentioned earlier that Google recommends an API key. The class has a flag variable called <em><strong>keyWarning</strong></em>. By default it is true and it will show the following warning message if you do not pass an API key while instantiating the class:</p>
<blockquote><p>Currently you are not using an API key. It is recommended that you use one. <a href="http://code.google.com/apis/urlshortener/v1/authentication.html#key">Click here to learn more about the API key</a></p></blockquote>
<p>To turn this notification off, just use this line:</p>
<pre class="brush:php">$objAPI-&gt;keyWarning = false;</pre>
<p><a href="http://www.vijayjoshi.org/examples/GAPIClass.php.txt"><img class="aligncenter size-full wp-image-451" title="Download GAPIClass" src="http://www.vijayjoshi.org/wp-content/uploads/download.png" alt="Download GAPIClass" width="180" height="45" /></a></p>
<div class="shr-publisher-1156"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F21%2Fphp-class-for-expanding-and-shortening-urls-using-google-url-shortener-api%2F' data-shr_title='PHP+class+for+expanding+and+shortening+URLs+using+Google+URL+shortener+API'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/21/php-class-for-expanding-and-shortening-urls-using-google-url-shortener-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Internal Server Error 500 in wp-admin</title>
		<link>http://www.vijayjoshi.org/2011/01/13/wordpress-internal-server-error-500-in-wp-admin/</link>
		<comments>http://www.vijayjoshi.org/2011/01/13/wordpress-internal-server-error-500-in-wp-admin/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 08:01:15 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1101</guid>
		<description><![CDATA[
			
				
			
		
If you are getting an internal server error 500 after installing wordpress while accessing admin, here is the fix.
Most likely it is caused by low memory limit on your server. To fix it, create a new file named php.ini in you wp-admin directory and put the following line in it.
memory_limit = 64M
Save the file, then reload the admin page and ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F13%2Fwordpress-internal-server-error-500-in-wp-admin%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F13%2Fwordpress-internal-server-error-500-in-wp-admin%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you are getting an internal server error 500 after installing wordpress while accessing admin, here is the fix.</p>
<p>Most likely it is caused by low memory limit on your server. To fix it, create a new file named <em><strong>php.ini</strong></em> in you <strong><em>wp-admin</em></strong> directory and put the following line in it.</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;">memory_limit = 64M</span></p>
<p>Save the file, then reload the admin page and it will work fine.</p>
<div class="shr-publisher-1101"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F13%2Fwordpress-internal-server-error-500-in-wp-admin%2F' data-shr_title='Wordpress+Internal+Server+Error+500+in+wp-admin'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/13/wordpress-internal-server-error-500-in-wp-admin/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>PHP: Shorten URLs using Google URL shortener API</title>
		<link>http://www.vijayjoshi.org/2011/01/12/php-shorten-urls-using-google-url-shortener-api/</link>
		<comments>http://www.vijayjoshi.org/2011/01/12/php-shorten-urls-using-google-url-shortener-api/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 06:27:42 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1093</guid>
		<description><![CDATA[
			
				
			
		
In past 2 posts you saw how short URLs can be expanded using the Google URL shortener API. This post shows how URLs can be shortened using this API.
API key is not mandatory for test purpose. Use this link to get an API key.
For shortening URLs, 2 points must be noted. First, a HTTP POST is required and the post data ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F12%2Fphp-shorten-urls-using-google-url-shortener-api%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F12%2Fphp-shorten-urls-using-google-url-shortener-api%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In past 2 posts you saw how short URLs can be expanded using the Google URL shortener API. This post shows how URLs can be shortened using this API.</p>
<p>API key is not mandatory for test purpose. <a title="Get API Key" href="http://code.google.com/apis/console/">Use this link to get an API key.</a></p>
<p><a title="Get API Key" href="http://code.google.com/apis/console/"></a>For shortening URLs, 2 points must be noted. First, a HTTP POST is required and the post data should be in JSON format. Here is the code:</p>
<pre class="brush:php">//This is the URL you want to shorten
$longUrl = 'https://www.packtpub.com/php-jquery-cookbook-to-create-interactive-web-applications/book';
$apiKey = 'your_api_key_here';
//Get API key from : http://code.google.com/apis/console/

$postData = array('longUrl' =&gt; $longUrl, 'key' =&gt; $apiKey);
$jsonData = json_encode($postData);

$curlObj = curl_init();

curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url');
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlObj, CURLOPT_HEADER, 0);
curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));
curl_setopt($curlObj, CURLOPT_POST, 1);
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);

$response = curl_exec($curlObj);

//change the response json string to object
$json = json_decode($response);

curl_close($curlObj);

echo 'Shortened URL is: '.$json-&gt;id;</pre>
<p>Here is the JSON response from Google:</p>
<pre class="brush:js">{
 "kind": "urlshortener#url",
 "id": "http://goo.gl/lBfOH",
 "longUrl": "https://www.packtpub.com/php-jquery-cookbook-to-create-interactive-web-applications/book"
}</pre>
<p>You can also read these:</p>
<ul>
<li><a href="http://www.vijayjoshi.org/2011/01/21/php-class-for-expanding-and-shortening-urls-using-google-url-shortener-api/">PHP class for expanding and shortening URLs using Google URL shortener API</a></li>
<li><a href="http://www.vijayjoshi.org/2011/01/12/using-php-and-curl-to-expand-urls-using-google-url-shortener-api/">Expanding URLs using cURL</a></li>
<li><a href="http://www.vijayjoshi.org/2011/01/11/php-expanding-urls-using-google-url-shortener-api/">Expand URLs using file_get_contents</a></li>
</ul>
<div class="shr-publisher-1093"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F12%2Fphp-shorten-urls-using-google-url-shortener-api%2F' data-shr_title='PHP%3A+Shorten+URLs+using+Google+URL+shortener+API'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/12/php-shorten-urls-using-google-url-shortener-api/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Using PHP and cURL to expand URLs using Google URL shortener API</title>
		<link>http://www.vijayjoshi.org/2011/01/12/using-php-and-curl-to-expand-urls-using-google-url-shortener-api/</link>
		<comments>http://www.vijayjoshi.org/2011/01/12/using-php-and-curl-to-expand-urls-using-google-url-shortener-api/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 18:49:03 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1082</guid>
		<description><![CDATA[
			
				
			
		
Yesterday I wrote this post explaining how short goo.gl URLs can be expanded using the newly launched goo.gl API. In that code we used php function get_file_contents to get the response from API.
How about implementing the same functionality using cURL now? If you have libcurl support installed with PHP, you are ready to use the cURL functions of PHP.
Here is ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F12%2Fusing-php-and-curl-to-expand-urls-using-google-url-shortener-api%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F12%2Fusing-php-and-curl-to-expand-urls-using-google-url-shortener-api%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Yesterday I wrote <a href="http://www.vijayjoshi.org/2011/01/11/php-expanding-urls-using-google-url-shortener-api/">this post</a> explaining how short <a title="Google URL shortener" href="http://goo.gl">goo.gl</a> URLs can be expanded using the newly launched goo.gl API. In that code we used php function <strong><em>get_file_contents</em></strong> to get the response from API.</p>
<p>How about implementing the same functionality using cURL now? If you have<strong> libcurl</strong> support installed with PHP, you are ready to use the cURL functions of PHP.</p>
<p>Here is the code. API key is not mandatory but Google recommends that you use one. It will increase your per day usage limits too. <a title="Google API key" href="http://code.google.com/apis/console/">Follow this link</a> to get an API key.</p>
<pre class="brush:php">$shortUrl = 'http://goo.gl/WlFX';
$apiKey = 'your_api_key_here';

$curlObj = curl_init();

curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url?shortUrl='.$shortUrl.'&amp;key='.$apiKey);
curl_setopt($curlObj, CURLOPT_HEADER, 0);
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);

$response = curl_exec($curlObj);

curl_close($curlObj);
$json = json_decode($response);

if($json-&gt;status === "OK")
{
	echo $json-&gt;longUrl;
}
else
{
	echo 'Bad luck.';
}</pre>
<p>And here is the full JSON response:</p>
<pre class="brush:js">{
 "kind": "urlshortener#url",
 "id": "http://goo.gl/WlFX",
 "longUrl": "https://www.packtpub.com/php-jquery-cookbook-to-create-interactive-web-applications/book",
 "status": "OK"
}</pre>
<p>Am important point to note. Since the API is on https, set the value for <strong><em>CURLOPT_SSL_VERIFYPEER</em></strong> to false. This will stop cURL from verifying the SSL certificate.</p>
<div class="shr-publisher-1082"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F12%2Fusing-php-and-curl-to-expand-urls-using-google-url-shortener-api%2F' data-shr_title='Using+PHP+and+cURL+to+expand+URLs+using+Google+URL+shortener+API'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/12/using-php-and-curl-to-expand-urls-using-google-url-shortener-api/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP: Expanding URLs using Google URL shortener API</title>
		<link>http://www.vijayjoshi.org/2011/01/11/php-expanding-urls-using-google-url-shortener-api/</link>
		<comments>http://www.vijayjoshi.org/2011/01/11/php-expanding-urls-using-google-url-shortener-api/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 08:22:12 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1073</guid>
		<description><![CDATA[
			
				
			
		
Yesterday. google launched an API for its URL shortening service http://goo.gl. Using this API developers will be able to expand/shorten URLs and get a user&#8217;s analytics and history programmaticaly.
Below is a small snippet of PHP code that expands a short URL. The response comes in JSON format, so we will use the json_decode function to convert it to object.
$shortUrl = 'http://goo.gl/WlFX';
$response ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F11%2Fphp-expanding-urls-using-google-url-shortener-api%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F11%2Fphp-expanding-urls-using-google-url-shortener-api%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Yesterday. google <a title="Google URL shortener API" href="http://googlecode.blogspot.com/2011/01/google-url-shortener-gets-api.html">launched an API</a> for its URL shortening service <a href="http://goo.gl">http://goo.gl</a>. Using this API developers will be able to expand/shorten URLs and get a user&#8217;s analytics and history programmaticaly.</p>
<p>Below is a small snippet of PHP code that expands a short URL. The response comes in JSON format, so we will use the <strong><em>json_decode</em></strong> function to convert it to object.</p>
<pre class="brush:php">$shortUrl = 'http://goo.gl/WlFX';
$response = file_get_contents('https://www.googleapis.com/urlshortener/v1/url?shortUrl='.$shortUrl);
$json = json_decode($response);

if($json-&gt;status === "OK")
{
	echo $json-&gt;longUrl;
}
else
{
	echo 'Bad luck.';
}</pre>
<p>Here is the full successfull response in JSON format.</p>
<pre class="brush:js">{
 "kind": "urlshortener#url",
 "id": "http://goo.gl/WlFX",
 "longUrl": "https://www.packtpub.com/php-jquery-cookbook-to-create-interactive-web-applications/book",
 "status": "OK"
}</pre>
<p>Finally, note that Google recommends the use of an API key. You can <a title="Google API Key" href="http://code.google.com/apis/console-help/#UsingKeys">visit this link</a> to read more about key and get a key from <a href="http://code.google.com/apis/console/">this link</a>.</p>
<p>After using the key, your URL will look like the following:</p>
<pre class="brush:php">$shortUrl = 'http://goo.gl/WlFX';
$apiKey = 'your_key_here';
$response = file_get_contents('https://www.googleapis.com/urlshortener/v1/url?shortUrl='.$shortUrl.'&amp;key='.$apiKey);</pre>
<div class="shr-publisher-1073"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F11%2Fphp-expanding-urls-using-google-url-shortener-api%2F' data-shr_title='PHP%3A+Expanding+URLs+using+Google+URL+shortener+API'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/11/php-expanding-urls-using-google-url-shortener-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Defining configuration values</title>
		<link>http://www.vijayjoshi.org/2011/01/07/php-defining-configuration-values/</link>
		<comments>http://www.vijayjoshi.org/2011/01/07/php-defining-configuration-values/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 15:09:32 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=1024</guid>
		<description><![CDATA[
			
				
			
		
Every web application requires configuration files which contain values that are used throughout the application. In this post we will look at some of the methods developers use to define configuration settings and also what should be avoided.
The ugly way
I have seen many many developers do this and am myself guilty of doing it during my initial coding days. Consider ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F07%2Fphp-defining-configuration-values%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F07%2Fphp-defining-configuration-values%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Every web application requires configuration files which contain values that are used throughout the application. In this post we will look at some of the methods developers use to define configuration settings and also what should be avoided.</p>
<h3>The ugly way</h3>
<p>I have seen many many developers do this and am myself guilty of doing it during my initial coding days. Consider the following code.</p>
<pre class="brush:php">//development
	define("HOST", "localhost");
	define("DATABASE_USER", "root");
	define("DATABASE_PASSWORD", "something");
	define("DATABASE_NAME", "UJNEEA");
	define('FILE_UPLOAD_PATH', 'C:/wamp/www/project/uploads/');

/*
	//production
	define("HOST", "localhost");
	define("DATABASE_USER", "username");
	define("DATABASE_PASSWORD", "password");
	define("DATABASE_NAME", "liveDB");
	define('FILE_UPLOAD_PATH', '/home/project/public_html/uploads/');
*/</pre>
<p>Developers define 2 sets of same variables for each environment. First set is for development environment while second is for production. To switch the configuration developer must comment all other sets and uncomment the desired one. This is untidy and error prone. <strong>Never ever use this in your applications.</strong></p>
<p><strong><span id="more-1024"></span><br />
</strong></p>
<h3>Using a flag</h3>
<p>Above method can be significantly improved by using a variable as a flag. The example is given below.</p>
<pre class="brush:php">define ('DEVELOPMENT', true);

if(DEVELOPMENT)
{
	define("HOST", "localhost");
	define("DATABASE_USER", "root");
	define("DATABASE_PASSWORD", "something");
	define("DATABASE_NAME", "myDB");
	define('FILE_UPLOAD_PATH', 'C:/wamp/www/project/uploads/');
}
else
{
	define("HOST", "localhost");
	define("DATABASE_USER", "username");
	define("DATABASE_PASSWORD", "password");
	define("DATABASE_NAME", "liveDB");
	define('FILE_UPLOAD_PATH', '/home/project/public_html/uploads/');
}</pre>
<p>Define a variable which will tell whether it is a development environment or a production one. Now when you have to switch environments, you do not have to do that comment/uncomment stuff. Just set the flag to true or false and PHP will pick the values accordingly.</p>
<h3>Using multi-dimensional arrays</h3>
<p>If you have used CodeIgniter, you must be familiar with this concept. Just use multi-dimensional arrays. Here is the explanation from CodeIgniter documentation itself.</p>
<blockquote><p>&#8220;The reason we use a multi-dimensional array rather than a more simple one is to permit you to optionally store  multiple sets of connection values. If, for example, you run multiple environments (development, production, test, etc.) under a single installation, you can set up a connection group for each, then switch between groups as needed.&#8221;</p></blockquote>
<pre class="brush:php">$active_group = "test";

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "pass";
$db['default']['database'] = "someDB";
$db['default']['file_upload_path'] = "C:/wamp/www/project/uploads/'";

$db['test']['hostname'] = "otherHost";
$db['test']['username'] = "root";
$db['test']['password'] = "password";
$db['test']['database'] = "hci";
$db['test']['file_upload_path'] = "C:/wamp/www/project/uploads/'";

$db['staging']['hostname'] = "evenAnotherHost";
$db['staging']['username'] = "root";
$db['staging']['password'] = "password";
$db['staging']['database'] = "dbname";
$db['staging']['file_upload_path'] = "E:/public_html/project/uploads/'";</pre>
<p>In this method, you only have to set the value of variable <strong><em>$active_group</em></strong> to whatever environment you wish to point to. This is much cleaner and configuration for more then 2 environments can be defined.</p>
<h3>Other methods</h3>
<p>There are many more ways you can define your configuration files. Some of them include:</p>
<ul>
<li>ini files</li>
<li>XML</li>
<li>YAML</li>
</ul>
<p>I will explain parsing the ini file using <strong><em>parse_ini_file</em></strong> function in an upcoming article.</p>
<p>Thanks for reading.</p>
<div class="shr-publisher-1024"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2011%2F01%2F07%2Fphp-defining-configuration-values%2F' data-shr_title='PHP%3A+Defining+configuration+values'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2011/01/07/php-defining-configuration-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Favorite tech links of the week : 20Dec &#8211; 26Dec, 2010</title>
		<link>http://www.vijayjoshi.org/2010/12/27/favorite-tech-links-of-the-week-20dec-26dec-2010/</link>
		<comments>http://www.vijayjoshi.org/2010/12/27/favorite-tech-links-of-the-week-20dec-26dec-2010/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 06:35:12 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=907</guid>
		<description><![CDATA[
			
				
			
		
This post contains some of the useful and interesting tech links I found during this week. To keep up to date with the latest information, subscribe to the feed or  follow me on twitter @v08i
jQuery 1.4.3 Offline Learning Kit &#8211; http://goo.gl/zoAb5

What features would you like to have in PHP? &#8211; http://goo.gl/Q84B9

35 Useful and Time saving Firefox Add-Ons &#8211; http://goo.gl/ZQQhF


Beware the ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2010%2F12%2F27%2Ffavorite-tech-links-of-the-week-20dec-26dec-2010%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2010%2F12%2F27%2Ffavorite-tech-links-of-the-week-20dec-26dec-2010%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This post contains some of the useful and interesting tech links I found during this week. To keep up to date with the latest information, <a title="Subscribe" href="http://vijayjoshi.org/feed">subscribe to the feed</a> or  follow me on twitter <a title="Follow Vijay Joshi on Twitter" href="http://twitter.com/v08i">@v08i</a></p>
<h4>jQuery 1.4.3 Offline Learning Kit &#8211; <a title="jQuery Offline Learning Kit" href="http://goo.gl/zoAb5">http://goo.gl/zoAb5</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/zoAb5"><img class="aligncenter size-full wp-image-911" title="jqkit" src="http://www.vijayjoshi.org/wp-content/uploads/jqkit.jpg" alt="jqkit" width="432" height="274" /></a></p>
<h4>What features would you like to have in PHP? &#8211; <a href="http://goo.gl/Q84B9">http://goo.gl/Q84B9</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/Q84B9"><img class="aligncenter size-full wp-image-917" title="php" src="http://www.vijayjoshi.org/wp-content/uploads/php.png" alt="php" width="442" height="233" /></a></p>
<h4>35 Useful and Time saving Firefox Add-Ons &#8211; <a title="35 firefox addons" href="http://goo.gl/ZQQhF">http://goo.gl/ZQQhF</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/ZQQhF"><img class="aligncenter size-full wp-image-914" title="firefox-wallpaper" src="http://www.vijayjoshi.org/wp-content/uploads/firefox-wallpaper.jpg" alt="firefox-wallpaper" width="399" height="250" /></a></p>
<h4><span id="more-907"></span></h4>
<h4>Beware the Trailing Comma of Death &#8211; <a href="http://goo.gl/P3LqX">http://goo.gl/P3LqX</a></h4>
<h4>2010: Yet another great year for PHP &#8211; <a href="http://goo.gl/WO0uY">http://goo.gl/WO0uY</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/WO0uY"><img class="aligncenter size-full wp-image-916" title="php2011" src="http://www.vijayjoshi.org/wp-content/uploads/php2011.png" alt="php2011" width="350" height="394" /></a></p>
<h4>The major incidents on the Internet in 2010 &#8211; <a href="http://goo.gl/lbfM1">http://goo.gl/lbfM1</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/lbfM1"><img class="aligncenter size-full wp-image-918" title="wikipedia" src="http://www.vijayjoshi.org/wp-content/uploads/wikipedia.png" alt="wikipedia" width="419" height="250" /></a></p>
<h4>Ten Alternative CMS Options to WordPress &#8211; <a href="http://goo.gl/1q9ly">http://goo.gl/1q9ly</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/1q9ly"><img class="aligncenter size-full wp-image-912" title="cms" src="http://www.vijayjoshi.org/wp-content/uploads/cms.png" alt="cms" width="482" height="507" /></a></p>
<h4>3 Lightweight Alternatives to phpMyAdmin &#8211; <a href="http://goo.gl/izsZc">http://goo.gl/izsZc</a></h4>
<h4>Rocking Out With CoffeeScript &#8211; <a title="Coffeescript" href="http://goo.gl/5FCYl">http://goo.gl/5FCYl</a></h4>
<p style="text-align: center;"><strong><a href="http://goo.gl/5FCYl"><img class="aligncenter size-full wp-image-913" title="coffee" src="http://www.vijayjoshi.org/wp-content/uploads/coffee.png" alt="coffee" width="433" height="256" /></a><br />
</strong></p>
<h4>50 Best jQuery Techniques 2010 &#8211; <a title="jQuery Techniques" href="http://goo.gl/4TfBF">http://goo.gl/4TfBF</a></h4>
<p style="text-align: center;"><a href="http://goo.gl/4TfBF"><img class="aligncenter size-full wp-image-915" title="bestjOfQuery" src="http://www.vijayjoshi.org/wp-content/uploads/bestjOfQuery.PNG" alt="bestjOfQuery" width="490" height="332" /></a></p>
<div class="shr-publisher-907"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2010%2F12%2F27%2Ffavorite-tech-links-of-the-week-20dec-26dec-2010%2F' data-shr_title='Favorite+tech+links+of+the+week+%3A+20Dec+-+26Dec%2C+2010'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2010/12/27/favorite-tech-links-of-the-week-20dec-26dec-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with XML Documents in PHP and jQuery</title>
		<link>http://www.vijayjoshi.org/2010/12/23/working-with-xml-documents-in-php-and-jquery/</link>
		<comments>http://www.vijayjoshi.org/2010/12/23/working-with-xml-documents-in-php-and-jquery/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 10:17:15 +0000</pubDate>
		<dc:creator>Vijay Joshi</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.vijayjoshi.org/?p=881</guid>
		<description><![CDATA[
			
				
			
		
Here is one more sample chapter from my book. It explains reading, writing and editing XML files with PHP and jQuery. Below are the chapter contents.
Loading XML from files and strings using SimpleXML
Accessing elements and attributes using SimpleXML
Searching elements using XPath
Reading an XML using DOM extension
Creating an XML using DOM extension
Modifying an XML using DOM extension
Parsing XML with jQuery

Loading XML ...]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2010%2F12%2F23%2Fworking-with-xml-documents-in-php-and-jquery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.vijayjoshi.org%2F2010%2F12%2F23%2Fworking-with-xml-documents-in-php-and-jquery%2F&amp;source=v08i&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Here is one more sample chapter from <a title="PHP jQuery Cookbook" href="http://www.vijayjoshi.org/2010/11/22/guys-i-am-writing-a-book/">my book</a>. It explains reading, writing and editing XML files with PHP and jQuery. Below are the chapter contents.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Loading XML from files and strings using SimpleXML</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Accessing elements and attributes using SimpleXML</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Searching elements using XPath</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Reading an XML using DOM extension</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Creating an XML using DOM extension</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Modifying an XML using DOM extension</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Parsing XML with jQuery</div>
<ul>
<li>Loading XML from files and strings using SimpleXML</li>
<li>Accessing elements and attributes using SimpleXML</li>
<li>Searching elements using XPath</li>
<li>Reading an XML using DOM extension</li>
<li>Creating an XML using DOM extension</li>
<li>Modifying an XML using DOM extension</li>
<li>Parsing XML with jQuery</li>
</ul>
<p>To read the full chapter follow this link - <a title="Working with XML in PHP and jQuery" href="https://www.packtpub.com/article/working-with-xml-documents">https://www.packtpub.com/article/working-with-xml-documents</a></p>
<p>You can also read the chapter on <a title="JSON with PHP and jQuery" href="http://www.vijayjoshi.org/2010/12/20/working-with-json-in-php-and-jquery/">using JSON with PHP and jQuery</a>.</p>
<div class="shr-publisher-881"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:right;height:30px;'><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.vijayjoshi.org%2F2010%2F12%2F23%2Fworking-with-xml-documents-in-php-and-jquery%2F' data-shr_title='Working+with+XML+Documents+in+PHP+and+jQuery'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://www.vijayjoshi.org/2010/12/23/working-with-xml-documents-in-php-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

