<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Abhi's Weblog</title>
	
	<link>http://abhinavsingh.com/blog</link>
	<description>PHP, Apache, MySQL, XMPP and Web Development</description>
	<lastBuildDate>Mon, 06 Jul 2009 18:30:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/abhinavsingh" type="application/rss+xml" /><feedburner:emailServiceId>abhinavsingh</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>XML Parsing in PHP, XPATH way – The best I know so far</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/WNAiFJ1Pfak/</link>
		<comments>http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 18:30:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=501</guid>
		<description><![CDATA[If you are a PHP developer, you surely must have done XML parsing at some stage or the other. Over the years I myself have implemented XML Parsing in atleast 3-4 different ways. Finally I have stuck to this approach which I personally find far more better than the rest, Not only because it&#8217;s quite [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/TLDD8_1ZDvVuz6ZRFJ43WLa79Ww/0/da"><img src="http://feedads.g.doubleclick.net/~a/TLDD8_1ZDvVuz6ZRFJ43WLa79Ww/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/TLDD8_1ZDvVuz6ZRFJ43WLa79Ww/1/da"><img src="http://feedads.g.doubleclick.net/~a/TLDD8_1ZDvVuz6ZRFJ43WLa79Ww/1/di" border="0" ismap="true"></img></a></p><p>If you are a PHP developer, you surely must have done XML parsing at some stage or the other. Over the years I myself have implemented XML Parsing in atleast 3-4 different ways. Finally I have stuck to this approach which I personally find far more better than the rest, Not only because it&#8217;s quite simple but also because it&#8217;s extendable. By extendable I mean, you don&#8217;t have to touch your code if the XML structure changes at a later stage or if you need to parse a new node at a later stage in the project. In this blog post we will try to parse my twitter timeline, using the XPATH way. To start with let&#8217;s see how a my twitter timeline look like:</p>
<p><strong style="font-size:20px;"><u>XML Source:</u></strong><br />
<a href="http://twitter.com/statuses/user_timeline/imoracle.xml" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://twitter.com/statuses/user_timeline/imoracle.xml&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/&wp-toolbar-fromtitle=XML Parsing in PHP, XPATH way &#8211; The best I know so far&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >http://twitter.com/statuses/user_timeline/imoracle.xml</a><br />
You may want to open this XML structure in a separate window of your browser for reference, as we walk through various XML parsing techniques.</p>
<p><strong style="font-size:20px;"><u>Data Requirement:</u></strong><br />
Before we proceed to parse this twitter timeline, lets decide what all data do we want to extract out of the XML. Each &lt;status&gt;&lt;/status&gt; node consists of two parts. Information about the tweet and information about the user.</p>
<p>Lets finalize the following list of nodes which we want about the tweets and also their corresponding XPATH&#8217;s:</p>
<ol>
<li><strong>id:</strong> ../statuses/status/id</li>
<li><strong>text:</strong> ../statuses/status/text</li>
<li><strong>source:</strong> ../statuses/status/source</li>
</ol>
<p>Further lets zero out on list of nodes we want about the user details:</p>
<ol>
<li><strong>id:</strong> ../statuses/status/user/id</li>
<li><strong>name:</strong> ../statuses/status/user/name</li>
<li><strong>screen_name:</strong> ../statuses/status/user/screen_name</li>
</ol>
<p><strong style="font-size:20px;"><u>XML Parsing:</u></strong><br />
Let us create a file called xpath.php, which will contain xpath of various nodes which we have finalized above. The xpath.php file will look like:</p>
<p><strong><u>xpath.php</u></strong></p>
<pre name="code" class="php">&lt;?php

  $user_status = array(
                      'status_id' => '../statuses/status/id',
                      'status_text' => '../statuses/status/text',
                      'status_source' => '../statuses/status/source',
                      'user_id' => '../statuses/status/user/id',
                      'user_name' => '../statuses/status/user/name',
                      'user_screen_name' => '../statuses/status/user/screen_name'
                      );

?&gt;</pre>
<p><strong><u>parser.php</u></strong></p>
<pre name="code" class="php">&lt;?php

  // include the xpath file
  require_once("xpath.php");

  // read the xml source as string
  $str = file_get_contents("imoracle.xml");

  // load the string as xml object
  $xml = simplexml_load_string($str);

  // initialize the return array
  $result = array();

  // parse the xml nodes
  foreach($user_status as $key => $xpath) {
    $values = $xml->xpath("{$xpath}");
    foreach($values as $value) {
      $result[$key][] = (string)$value;
    }
  }

  // print the return array
  print_r($result);

?&gt;</pre>
<p><strong style="font-size:20px;"><u>Results:</u></strong><br />
If we try to print out this <strong>$result</strong> on a browser screen, here is how the result will look like:</p>
<pre name="code" class="php">Array
(
    [status_id] => Array
        (
            [0] => 2499838341
            [1] => 2499780899
            [2] => 2499724163
            [3] => 2499607183
        )

    [status_text] => Array
        (
            [0] => 13 Beautiful Wordpress Showcase Sites
            [1] => 55 Really Creative And Unique Blog Design Showcase
            [2] => Need PHP symfony developer to complete tvguide.com clone
            [3] => 22 Open Source PHP Frameworks To Shorten Your Development Time
        )

    [status_source] => Array
        (
            [0] => &lt;a href="http://apiwiki.twitter.com/"&gt;API&lt;/a&gt;
            [1] => &lt;a href="http://apiwiki.twitter.com/"&gt;API&lt;/a&gt;
            [2] => &lt;a href="http://apiwiki.twitter.com/"&gt;API&lt;/a&gt;
            [3] => &lt;a href="http://apiwiki.twitter.com/"&gt;API&lt;/a&gt;
        )

    [user_id] => Array
        (
            [0] => 14574588
            [1] => 14574588
            [2] => 14574588
            [3] => 14574588
        )

    [user_name] => Array
        (
            [0] => Abhinav Singh
            [1] => Abhinav Singh
            [2] => Abhinav Singh
            [3] => Abhinav Singh
        )

    [user_screen_name] => Array
        (
            [0] => imoracle
            [1] => imoracle
            [2] => imoracle
            [3] => imoracle
        )

)</pre>
<p><strong style="font-size:20px;"><u>The Best Part:</u></strong><br />
The best part of this approach is that, suppose in future our project demands extraction of the following nodes too:</p>
<ol>
<li><strong>truncated:</strong> ../statuses/status/truncated</li>
<li><strong>favorited:</strong> ../statuses/status/truncated</li>
<li><strong>location:</strong> ../statuses/status/user/location</li>
<li><strong>description:</strong> ../statuses/status/user/description</li>
</ol>
<p>All we need to do is, simply add these xpaths in <strong>xpath.php</strong> file, without having to change the <strong>parser.php</strong> file. In case of a project you may want to create a function or a class out of the parser.php file so that you can request data from that.</p>
<p>Download the source code from here:<br />
<a href="http://abhinavsingh.googlecode.com/files/xml-parser-xpath-way.rar" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.googlecode.com/files/xml-parser-xpath-way.rar&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/&wp-toolbar-fromtitle=XML Parsing in PHP, XPATH way &#8211; The best I know so far&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >http://abhinavsingh.googlecode.com/files/xml-parser-xpath-way.rar</a></p>
<p>If you liked the post, do not forget to leave a comment and <a href="http://twitter.com/imoracle" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://twitter.com/imoracle&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/&wp-toolbar-fromtitle=XML Parsing in PHP, XPATH way &#8211; The best I know so far&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" ><strong>follow me on twitter</strong></a>.<br />
Do let me know of better methods if you know any. Happy XML Parsing!</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/WNAiFJ1Pfak" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/</feedburner:origLink></item>
		<item>
		<title>Facebook type image rotation and more using PHP and Javascript</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/HrIcI5P6Puo/</link>
		<comments>http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 16:38:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=496</guid>
		<description><![CDATA[If you are a facebook geek like me, you must have noticed till now the image rotate functionality in the photo albums. Facebook allows you to rotate images 90 degree clockwise and anti-clockwise after image upload. If you haven&#8217;t tried that till now, below is a screenshot for your convenience.

Question:
But the question is how does [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/brkBNKJj35c9CmyGIdQ1QWyWmFc/0/da"><img src="http://feedads.g.doubleclick.net/~a/brkBNKJj35c9CmyGIdQ1QWyWmFc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/brkBNKJj35c9CmyGIdQ1QWyWmFc/1/da"><img src="http://feedads.g.doubleclick.net/~a/brkBNKJj35c9CmyGIdQ1QWyWmFc/1/di" border="0" ismap="true"></img></a></p><p>If you are a facebook geek like me, you must have noticed till now the image rotate functionality in the photo albums. Facebook allows you to rotate images 90 degree clockwise and anti-clockwise after image upload. If you haven&#8217;t tried that till now, below is a screenshot for your convenience.</p>
<p><img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/07/facebook-image-rotate.png" alt="facebook-image-rotate" title="facebook-image-rotate" width="206" height="147" style="float:right;margin:5px;margin-right:0px;border:1px solid #BBBBBB;"/></p>
<p><strong style="font-size:20px;"><u>Question:</u></strong><br />
But the question is how does facebook team succeed doing this in one click. Today I tried looking around for a solution over internet and I came across the inbuilt <a href="http://in.php.net/imagerotate" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://in.php.net/imagerotate&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/&wp-toolbar-fromtitle=Facebook type image rotation and more using PHP and Javascript&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >imagerotate </a>functionality in PHP.</p>
<p><strong style="font-size:20px;"><u>Problem:</u></strong><br />
Unfortunately the problem is that even if you have GD Library extension enabled in PHP, imagerotate function just doesn&#8217;t work. After some research I found that to enable imagerotate function inside PHP, you need to compile and build PHP manually and enable imagerotate while installing PHP. You can check your PHP installation support for imagerotate using the following command line:</p>
<pre name="code" class="php">php -r "var_dump(function_exists('imagerotate'));"</pre>
<p><strong style="font-size:20px;"><u>Solution:</u></strong><br />
Since I didn&#8217;t want to touch my current installation of PHP, <a href="http://www.imagemagick.org/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://www.imagemagick.org/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/&wp-toolbar-fromtitle=Facebook type image rotation and more using PHP and Javascript&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >ImageMagick</a> came to my rescue. Below I will show you how did I achieve cloning facebook&#8217;s 90 degree rotation functionality and also added a custom degree rotation (functionality usually seen in collage tools).</p>
<p><strong style="font-size:20px;"><u>Demo:</u></strong><br />
You can try a live demo of the application here:<br />
<a href="http://abhinavsingh.com/webdemos/imagerotate/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.com/webdemos/imagerotate/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/&wp-toolbar-fromtitle=Facebook type image rotation and more using PHP and Javascript&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >http://abhinavsingh.com/webdemos/imagerotate/</a></p>
<p><a href="http://abhinavsingh.com/webdemos/imagerotate/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.com/webdemos/imagerotate/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/&wp-toolbar-fromtitle=Facebook type image rotation and more using PHP and Javascript&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;"  style="border:none;text-decoration:none;"><img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/07/3678922852_88c4639147.jpg" alt="facebook-image-rotate-using-php-javascript" title="facebook-image-rotate-using-php-javascript" width="500" height="411" class="aligncenter size-full wp-image-498" /></a></p>
<p><strong style="font-size:20px;"><u>Source Code:</u></strong><br />
Before you go ahead and try this demo, you will need to install imagemagick on your system. On debian and ubuntu this can be achieved by the following command:</p>
<pre class="php" name="code">apt-get install imagemagick</pre>
<p>To make sure installation is alright, run the following command from the shell:</p>
<pre class="php" name="code">convert -version</pre>
<p>You should see something like this:</p>
<pre class="php" name="code">Version: ImageMagick 6.2.4 02/10/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC
</pre>
<p>Convert is a command line utility provided by imagemagick. <a href="http://www.imagemagick.org/script/convert.php" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://www.imagemagick.org/script/convert.php&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/&wp-toolbar-fromtitle=Facebook type image rotation and more using PHP and Javascript&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Read more about convert here</a>.</p>
<p>The source code consists of the following files and folders:</p>
<ul>
<li><u>index.php</u> : Generates the Frontend UI part for the application</li>
<li><u>action.php</u> : Responsible for handling requests and rotating image using imagemagick library</li>
<li><u>style.css</u> : Used for styling the UI</li>
<li><u>script.js</u> : Used for handling the horizontal slider</li>
<li><u>images</u> : This folder contains all the required images for the application. The image which we will be rotating left and right is &#8220;me.jpg&#8221;</li>
</ul>
<p><strong style="font-size:16px;"><u>action.php</u></strong></p>
<pre name="code" class="php">  // Image Path
  $image = "images/me.jpg";
  $original = "images/me-original.jpg";

  if($_POST['restore']) {
    exec("cp ".$original." ".$image);
  }
  else if($_GET['left'] == 1 || $_GET['right'] == 1 || $_POST['degree']) {
    // Rotation Degree
    if(isset($_GET['left'])) $degree = -90;
    if(isset($_GET['right'])) $degree = 90;
    if(isset($_POST['degree'])) $degree = $_POST['degree'];

    // rotate image
    if(is_numeric($degree)) exec("convert ".$image." -rotate ".$degree." ".$image);
  }</pre>
<p>From the UI, a user can pass 4 kind of requests:</p>
<ul>
<li>Rotate Image 90 degree clockwise by clicking the button on bottom right corner</li>
<li>Rotate Image 90 degree anti-clockwise by clicking the button on bottom right corner</li>
<li>Rotate Image x degree, by choosing the value of x using horizontal slider on bottom left</li>
<li>Restore the image back to the original self</li>
</ul>
<p>action.php handles the incoming 4 cases, calculates $degree to rotate and passes as a parameters to the command line utility provided by imagemagick.</p>
<p><strong style="font-size:20px;"><u>Download Code:</u></strong><br />
Download the complete source code from here:<br />
<a href="http://abhinavsingh.googlecode.com/files/image-rotate-application.rar" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.googlecode.com/files/image-rotate-application.rar&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/&wp-toolbar-fromtitle=Facebook type image rotation and more using PHP and Javascript&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >http://abhinavsingh.googlecode.com/files/image-rotate-application.rar</a><br />
Unzip into a folder, and make the images directory writable.<br />
<strong style="color:#FF0000">PS: Application not tested on IE browser</strong></p>
<p>Don&#8217;t forget to share and leave a comment if you liked the post.<br />
Cheers!</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/HrIcI5P6Puo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/</feedburner:origLink></item>
		<item>
		<title>Wordpress Toolbar v 2.1 – Adding support for tinyurl, sociable and a lot more</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/mAFjElf7wAo/</link>
		<comments>http://abhinavsingh.com/blog/2009/06/wordpress-toolbar-v-2-1-adding-support-for-tinyurl-sociable-and-a-lot-more/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 22:25:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Sociable]]></category>
		<category><![CDATA[Tinyurl]]></category>
		<category><![CDATA[Toolbar]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=492</guid>
		<description><![CDATA[


Wordpress Toolbar Version 2.0 allowed bloggers to catch their viewers on the go. It modifies all the internal/external links in the blog post (except those specified for exception), to open them with an attractive toolbar. Since wordpress toolbar used javascript to enable this functionality, your SEO always remain intact.
Moving forward, I accumulated all the suggestions [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/53PsjaBwzEGEfYkhiqcQN-8w6ws/0/da"><img src="http://feedads.g.doubleclick.net/~a/53PsjaBwzEGEfYkhiqcQN-8w6ws/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/53PsjaBwzEGEfYkhiqcQN-8w6ws/1/da"><img src="http://feedads.g.doubleclick.net/~a/53PsjaBwzEGEfYkhiqcQN-8w6ws/1/di" border="0" ismap="true"></img></a></p><div style="float:right;border:4px solid #464646;padding:5px;width:110px;height:105px;margin-left:10px;position:relative;">
<a href="http://downloads.wordpress.org/plugin/wordpress-toolbar.2.1.1.zip" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://downloads.wordpress.org/plugin/wordpress-toolbar.2.1.1.zip&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/wordpress-toolbar-v-2-1-adding-support-for-tinyurl-sociable-and-a-lot-more/&wp-toolbar-fromtitle=Wordpress Toolbar v 2.1 &#8211; Adding support for tinyurl, sociable and a lot more&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;"  target="_blank"><img style="border:0px;" src="http://abhinavsingh.com/blog/wp-content/uploads/2009/02/download-plugin.jpg" alt="download-wordpress-plugin" title="download-wordpress-plugin" width="108" height="108" class="size-full wp-image-280" /></a>
</div>
<p><a href="http://abhinavsingh.com/blog/2009/02/wordpress-toolbar-plugin/">Wordpress Toolbar Version 2.0</a> allowed bloggers to catch their viewers on the go. It modifies all the internal/external links in the blog post (except those specified for exception), to open them with an attractive toolbar. Since wordpress toolbar used javascript to enable this functionality, your SEO always remain intact.</p>
<p>Moving forward, I accumulated all the suggestions posted in more than a 100 comments on the introductory blog post, and tried to include as many features as possible in version 2.1. A few features worth talking about are:</p>
<p><strong style="font-size:18px"><u>New in Version 2.1:</u></strong></p>
<ul>
<li><strong>Plugin Size:</strong> Inspite of adding new features in version 2.1, plugin size has decreased from 100+ Kb to 50+ Kb. This is mainly because, plugin now uses site favicons fetched using Google S2 web service. It will allows for parallelization as your blog loads.</li>
<li><strong>Tinyurl:</strong> Version 2.1 introduces support for <a href="http://tinyurl.com" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://tinyurl.com&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/wordpress-toolbar-v-2-1-adding-support-for-tinyurl-sociable-and-a-lot-more/&wp-toolbar-fromtitle=Wordpress Toolbar v 2.1 &#8211; Adding support for tinyurl, sociable and a lot more&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >tinyurl</a>. If you are wondering what does that mean, scroll down to the bottom of this blog post and you will see tinyurl corresponding to this post. Enabling this feature inside admin panel will automatically submit your post to tinyurl and display it at the end of the blog post.</li>
<li><strong>Sociable:</strong> Version 2.1 also introduces sociable. Enabling it inside the admin panel will put the social icons at the end of every blog post. You can choose icons from the admin panel. For an example scroll down to the bottom of this post.</li>
<li><strong>target=&#8221;_blank&#8221;</strong>, was one of the most wished feature in all the posted comments. Enabling it from admin panel, will force open the url&#8217;s in your post into a new window.</li>
<li><strong>New Toolbar Skin:</strong> Version 2.1 adds facebook toolbar skin into its kitty. From admin panel you can choose dark shade stumble upon skin or light blue facebook skin.</li>
<li><strong>Add More Custom Skin:</strong> Yes, you read it right. I found a lot of bloggers using this plugin, wish to have their own custom toolbar skins. However, they just don&#8217;t want to tweak the code directly. Version 2.1 allows blog publishers to add their own custom skins without having to tweak the code manually. Read through to know how to add your custom skins</li>
<li><strong>PHP4 Support:</strong> Last but not the least, support for PHP version 4.</li>
</ul>
<p><strong style="font-size:18px"><u>Installation Guide:</u></strong></p>
<ol>
<li>If you are trying to upgrade from version 2.0, you can either go for manual upgrade or automatic up using wordpress admin panel.</li>
<li><u>Manual Upgrade</u>: Deactivate version 2.0, Delete wordpress-toolbar folder from plugins directory, Download version 2.1, Copy wordpress-toolbar directory to plugins folder, Activate version 2.1, Visit wordpress toolbar administration panel</li>
<li><u>Automatic Upgrade</u>: Go to wordpress admin panel, click on plugins in left navigation bar, scroll down to wordpress-toolbar and click upgrade automatically</li>
</ol>
<p><strong style="font-size:18px"><u>Version Change logs:</u></strong></p>
<ol>
<li><strong>Version 2.1.x</strong> : Enhancements added to version 2.0. Specifically it includes:
<ul>
<li>Support for tinyurl &#8211; url shortening service</li>
<li>Support for sociable &#8211; adding social share icons at the end of every post</li>
<li>Facebook skin added</li>
<li>target=&#8221;_blank&#8221; support added</li>
<li>Plugin is now PHP4 compatible</li>
</ul>
</li>
<li><strong>Version 2.0</strong> : Version was upgraded since 2.0 is a complete overhaul from 1.x series. Specifically it allows you to do the following:
<ul>
<li>You can now use auto upgrade for future releases without caring to move the plugin files everytime</li>
<li>Admin panel allows you to fully customize your toolbar</li>
<li>You can now ever choose social icons of your choice to be displayed on the toolbar</li>
<li>Choose domains for which you don&#8217;t want to activate this plugin</li>
<li>Unlike 1.x series, 2.0 do not change the href=&#8221;" urls. Instead now it uses javascript onclick event to activate toolbar and hence taking care of your SEO needs</li>
</ul>
</li>
<li><strong>Version 1.1</strong> : Include emergency CSS and HTML Validation fixes for IE browsers</li>
<li><strong>Version 1.0</strong> : The first release of wordpress toolbar</li>
</ol>
<p><strong style="font-size:18px"><u>How to add my own custom toolbar skin:</u></strong><br />
Before you go ahead and put in your custom skin, a little about various components populating that toolbar.</p>
<ol>
<li><u>home.gif</u>: The left most home icon on the toolbar</li>
<li><u>background.gif</u>: The background image of your toolbar</li>
<li><u>button_left.gif</u>: The left cap image for &#8220;comment back&#8221; button</li>
<li><u>button_right.gif</u>: The right cap image for &#8220;comment back&#8221; button</li>
<li><u>close.gif</u>: The right most close icon on the toolbar</li>
</ol>
<p>So by now you know, to add your custom skin to the toolbar all you need is 5 images. Lets see what all I did to add facebook skin in this release.</p>
<ol>
<li>First of all you must choose a short name and full name for your skin. I chose a shortname &#8220;fb&#8221; and fullname &#8220;facebook&#8221; for the facebook custom skin</li>
<li>Go to <code>plugins/wordpress-toolbar/extra/skins</code> folder and create a folder. Name it &#8220;fb&#8221; (the shortname for your skin)</li>
<li>Inside this folder drop your 5 images. (Remember names of the images must be same as above)</li>
<li>Along with the images you need to drop a stylesheet named style.css to customize the font family, font sizes etc appearing on the toolbar. For reference see the style.css file inside &#8220;fb&#8221; folder bundled with this plugin</li>
<li>Finally you need to create a &#8220;readme.txt&#8221; file inside &#8220;fb&#8221; folder. Open it and type in your skin&#8217;s fullname inside this file. This file will be used more extensively in future releases.</li>
</ol>
<p>Now go to your admin panel and if you did it right you must see an option to choose your custom skin next to &#8220;choose a skin&#8221; option. Wasn&#8217;t that easy!</p>
<p><strong style="font-size:18px"><u>Planned Future Releases:</u></strong></p>
<ol>
<li>The plugin is still not compatible with the Google Analytics and Shadow Box Plugin, mainly due to similar nature in which all the plugin&#8217;s operate. Need to work on that.</li>
<li>Waiting for more suggestions and feedbacks from the plugin users on how we can evolve this plugin to serve the open source community</li>
</ol>
<p>Do leave a comment or any suggestion for improvement and don&#8217;t forget to give a rating at <a href="http://wordpress.org/extend/plugins/wordpress-toolbar/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://wordpress.org/extend/plugins/wordpress-toolbar/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/wordpress-toolbar-v-2-1-adding-support-for-tinyurl-sociable-and-a-lot-more/&wp-toolbar-fromtitle=Wordpress Toolbar v 2.1 &#8211; Adding support for tinyurl, sociable and a lot more&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >http://wordpress.org/extend/plugins/wordpress-toolbar/</a>.</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/mAFjElf7wAo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/06/wordpress-toolbar-v-2-1-adding-support-for-tinyurl-sociable-and-a-lot-more/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/06/wordpress-toolbar-v-2-1-adding-support-for-tinyurl-sociable-and-a-lot-more/</feedburner:origLink></item>
		<item>
		<title>Toggle : A Javascript game, anyone up for the challenge?</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/Ph3hMAx29kU/</link>
		<comments>http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 10:24:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Online Games]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=438</guid>
		<description><![CDATA[This weekend I came across a game made using java applets. Initially looked like its possible to solve it, but slowly we realized that there might be no solution to this game. Finally I decided to clone it using javascript and see if you can solve the same.
Toggle

PS: Tested on all browsers except IE
Modes:
I included [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/nV0F9tozG4IMEsfNZnqwe-rd53I/0/da"><img src="http://feedads.g.doubleclick.net/~a/nV0F9tozG4IMEsfNZnqwe-rd53I/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/nV0F9tozG4IMEsfNZnqwe-rd53I/1/da"><img src="http://feedads.g.doubleclick.net/~a/nV0F9tozG4IMEsfNZnqwe-rd53I/1/di" border="0" ismap="true"></img></a></p><p>This weekend I came across a game made using java applets. Initially looked like its possible to solve it, but slowly we realized that there might be no solution to this game. Finally I decided to clone it using javascript and see if you can solve the same.</p>
<div style="font-weight:bold; font-size:32px; color:#000000; margin-left:270px; margin-top:10px;">Toggle</div>
<div id="container" style="position:relative; height:300px; margin-top:5px; margin-left:200px;"></div>
<p><strong style="color:#AA0000">PS: Tested on all browsers except IE</strong></p>
<p><strong><u>Modes:</u></strong><br />
I included a custom mode in this game. Original game had only the classic mode.</p>
<ul>
<li><u>Classic Mode:</u> When you click a square in classic mode, that clicked square and all neighbourhood squares toggle their colors (excluding diagonal neighbours).</li>
<li><u>Custom Mode:</u> In custom mode, when you click a square, the clicked square and all neighbourhood squares toggle their colors (including diagonal neighbours).</li>
</ul>
<p><strong><u>Rules:</u></strong></p>
<ul>
<li>Destination is to fill all the squares with black color.</li>
<li>Ideally game should be played in a single mode only. However I have provided an option where you can switch modes in between the game. So you are free to either play it in a single mode throughout, or switch modes as and when you feel is the requirement</li>
<li>If you are finally able to make it, click view history, copy the steps you followed to conquer this game and post it as a comment to this blog post</li>
</ul>
<p><strong style="font-size:26px;"><u>Source Code:</u></strong><br />
The source code consists of toggle.js and toggle.css. Find below the source code, and towards the end, find how to embed the same on your page/blog.</p>
<p><strong><u>toggle.css</u></strong></p>
<pre class="css" name="code">/*

  Script: toggle.css
  Author: Abhinav Singh mailsforabhinav[at]gmail[dot]com
  Website: http://abhinavsingh.com
  Code license: GNU General Public License v3

*/
.box {
  border:1px solid #000000;
  cursor:pointer;
}
.boxColored {
  border:1px solid #FFFFFF;
  background: #000000;
  cursor:pointer;
}
</pre>
<p><strong><u>toggle.js</u></strong></p>
<pre class="javascript" name="code">/*

  Script: toggle.js
  Author: Abhinav Singh mailsforabhinav[at]gmail[dot]com
  Website: http://abhinavsingh.com
  Code license: GNU General Public License v3

*/
Array.prototype.unique = function(b) {
  var a = [], i, l = this.length;
  for(i=0; i&lt;l; i++) {
    if(a.indexOf(this[i], 0, b) &lt; 0) { a.push(this[i]); }
  }
  return a;
};
var $ = {
  html: '',
  cid: 'container',
  xBoxes: 5,
  yBoxes: 5,
  boxWidth: 50,
  boxHeight: 50,
  version: 'classic',
  history: Array(),
  init: function() {
    var tmp = '';
    for(var i=0;i&lt;this.yBoxes;i++) {
      for(var j=0;j&lt;this.xBoxes;j++) {
        tmp += '&lt;div onclick="$.toggle(this)" name="box" id="box-'+i+'-'+j+'" style="position:absolute; left:'+(j*this.boxWidth)+'px; top:'+(i*this.boxHeight)+'px; height:'+this.boxHeight+'px; width:'+this.boxWidth+'px" class="box"&gt;';
        tmp += '&lt;/div&gt;';
      }
    }
    tmp += '&lt;div style="position:absolute; top:'+((this.yBoxes*this.boxHeight)+5)+'px; left:0px;"&gt;';
    tmp += '  &lt;b style="float:left"&gt;Version:&lt;/b&gt; ';
    tmp += '  &lt;select style="float:left" id="version" onchange="$.version = this.options[this.selectedIndex].value;"&gt;';
    tmp += '    &lt;option value="classic"&gt;Classic&lt;/option&gt;';
    tmp += '    &lt;option value="custom"&gt;Custom&lt;/option&gt;';
    tmp += '  &lt;/select&gt;';
    tmp += '  &lt;div style="float:left; padding-left:20px; text-decoration:underline; cursor:pointer;" onclick="alert($.history.unique())"&gt;View History&lt;/div&gt;';
    tmp += '&lt;/div&gt;';
    document.getElementById(this.cid).innerHTML = tmp;
  },
  toggle: function(t) {
    this.history.push((t.id.toString()).replace('box-',''));
    id = t.id; ids = id.split("-");
    xid = parseInt(ids[1]); yid = parseInt(ids[2]);

    for(var l=xid-1; l&lt;=xid+1; l++) {
      for(var m=yid-1; m&lt;=yid+1; m++) {
        if(l&gt;=0 &#038;&#038; l&lt;this.xBoxes &#038;&#038; m&gt;=0 &#038;&#038; m&lt;this.yBoxes) {
          if(this.version == "classic") {
            if((l == xid-1 &#038;&#038; m == yid-1) || (l == xid+1 &#038;&#038; m == yid-1) || (l == xid-1 &#038;&#038; m == yid+1) || (l == xid+1 &#038;&#038; m == yid+1)) {

            }
            else {
              var boxid = document.getElementById('box-'+l+'-'+m);
              if(boxid.className == "box") boxid.className = "boxColored";
              else if(boxid.className == "boxColored") boxid.className = "box";
            }
          }
          if(this.version == "custom") {
            var boxid = document.getElementById('box-'+l+'-'+m);
            if(boxid.className == "box") boxid.className = "boxColored";
            else if(boxid.className == "boxColored") boxid.className = "box";
          }
        }
      }
    }
  }
}
$.init();</pre>
<p><strong><u>How to embed toggle on my page/blog?</u></strong></p>
<ul>
<li>Simply copy the js and css files from above or download them from here: <a href="http://abhinavsingh.com/toggle/toggle.js" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.com/toggle/toggle.js&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/&wp-toolbar-fromtitle=Toggle : A Javascript game, anyone up for the challenge?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >toggle.js</a>, <a href="http://abhinavsingh.com/toggle/toggle.css" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.com/toggle/toggle.css&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/&wp-toolbar-fromtitle=Toggle : A Javascript game, anyone up for the challenge?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >toggle.css</a></li>
<li>Include the two on your page/blog. toggle.js automatically calls up <strong>$.init()</strong> on load. $.init() method will look for a div with id <strong>$.cid</strong> on you page, and populate the game in the same div. Hence make sure you have a div with id $.cid on the page.</li>
<li><strong>$.xBoxes</strong>, <strong>$.yBoxes</strong>, <strong>$.boxWidth</strong>, <strong>$.boxHeight</strong> are a few tunable parameters you may want to play with</li>
</ul>
<link rel="stylesheet" href="http://abhinavsingh.com/toggle/toggle.css" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.com/toggle/toggle.css&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/&wp-toolbar-fromtitle=Toggle : A Javascript game, anyone up for the challenge?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;"  type="text/css"/>
<script type="text/javascript" src="http://abhinavsingh.com/toggle/toggle.js" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://abhinavsingh.com/toggle/toggle.js&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/&wp-toolbar-fromtitle=Toggle : A Javascript game, anyone up for the challenge?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" ></script><br />
Happy Toggling!</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/Ph3hMAx29kU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/06/toggle-a-javascript-game-anyone-up-for-the-challenge/</feedburner:origLink></item>
		<item>
		<title>SEO Analyzer v 1.2 – Adding support for Bing along with Google and Yahoo</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/te_SwCCJoIk/</link>
		<comments>http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 11:51:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Desktop Application]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SEO Analyzer]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=425</guid>
		<description><![CDATA[On May 28, 2009 Microsoft announced Bing which has now replaced Live search. And within 2 week of it&#8217;s release, Bing seems to have leapfrog Yahoo search in U.S.
With Bing coming up as a strong contender to Google and Yahoo search engines, I have added support for Bing in SEO Analyzer v 1.2. This will [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/ihqzrjf_leqTv1_BZN49jUr9hsQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/ihqzrjf_leqTv1_BZN49jUr9hsQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ihqzrjf_leqTv1_BZN49jUr9hsQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/ihqzrjf_leqTv1_BZN49jUr9hsQ/1/di" border="0" ismap="true"></img></a></p><p>On May 28, 2009 Microsoft announced <a href="http://bing.com" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://bing.com&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/&wp-toolbar-fromtitle=SEO Analyzer v 1.2 &#8211; Adding support for Bing along with Google and Yahoo&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Bing</a> which has now replaced Live search. And within 2 week of it&#8217;s release, Bing seems to have leapfrog <a href="http://ysearch.com" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://ysearch.com&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/&wp-toolbar-fromtitle=SEO Analyzer v 1.2 &#8211; Adding support for Bing along with Google and Yahoo&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Yahoo search</a> in U.S.</p>
<p>With Bing coming up as a strong contender to Google and Yahoo search engines, I have added support for Bing in <a href="http://code.google.com/p/seoanalyzer" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/seoanalyzer&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/&wp-toolbar-fromtitle=SEO Analyzer v 1.2 &#8211; Adding support for Bing along with Google and Yahoo&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >SEO Analyzer v 1.2</a>. This will enable you to analyze a site&#8217;s ranking for a particular keyword on Bing search engine, along with Yahoo and Google search engines.</p>
<p><a href="http://code.google.com/p/seoanalyzer/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/seoanalyzer/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/&wp-toolbar-fromtitle=SEO Analyzer v 1.2 &#8211; Adding support for Bing along with Google and Yahoo&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" ><img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/06/seoanalyzer-bing-support.jpg" alt="seoanalyzer-bing-support" title="seoanalyzer-bing-support" width="351" height="502" class="alignleft size-full wp-image-426" /></a></p>
<p><strong><u>SEO Analyzer Future Roadmap:</u></strong></p>
<ul>
<li>Saving reports on spreadsheets</li>
<li>Comparing two sites for a list of keywords</li>
<li>Keyword density extraction tool</li>
</ul>
<p>Happy SEO Analysis!</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/te_SwCCJoIk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/06/seo-analyzer-v-12-adding-support-for-bing-along-with-google-and-yahoo/</feedburner:origLink></item>
		<item>
		<title>How to broadcast a message to your Gtalk friends using JAXL?</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/eaThizLHaAE/</link>
		<comments>http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/#comments</comments>
		<pubDate>Wed, 20 May 2009 12:31:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[Gtalk]]></category>
		<category><![CDATA[Gtalkbots]]></category>
		<category><![CDATA[JAXL]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=395</guid>
		<description><![CDATA[In this era of social media we all look forward to easy and utility tools to easily market our site and blogs. In this post I will demonstrate a ready to use script, which will help you broadcast your message to everyone on your gtalk friend list in one go.
jaxl4broadcast.class.php
jaxl4broadcast.class.php is an extension of JAXL [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/QjqchhnTi_h_0XXuVPcWH63ss6o/0/da"><img src="http://feedads.g.doubleclick.net/~a/QjqchhnTi_h_0XXuVPcWH63ss6o/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QjqchhnTi_h_0XXuVPcWH63ss6o/1/da"><img src="http://feedads.g.doubleclick.net/~a/QjqchhnTi_h_0XXuVPcWH63ss6o/1/di" border="0" ismap="true"></img></a></p><p>In this era of social media we all look forward to easy and utility tools to easily market our site and blogs. In this post I will demonstrate a ready to use script, which will help you broadcast your message to everyone on your gtalk friend list in one go.</p>
<p><strong style="font-size:16px;"><u>jaxl4broadcast.class.php</u></strong><br />
jaxl4broadcast.class.php is an extension of <a href="http://abhinavsingh.com/blog/2009/01/introducing-jaxl-open-source-jabber-xmpp-library/ target="_blank"">JAXL library</a>. This extension simply saves all your buddy list in an array while connecting with Gtalk servers, and then send out your custom message to all of them in one go. The code that will do the task:</p>
<pre class="php" name="code">
    function setStatus() {
      $this->sendStatus($this->status);
      print "Setting Status...\n";
      print "Done\n";

      foreach($this->rosterList as $buddy) {
        print "Sending message to ".$buddy."\n";
        $this->sendMessage($buddy,"Message broadcasted using *JAXL Library http://code.google.com/p/jaxl*");
        sleep(1);
      }

      /* Now loggout of the system */
      exit;
    }</pre>
<p><strong style="color:#FF0000">PS: You need to checkout the latest version of xmpp.class.php for jaxl4broadcast.class.php to work. jaxl-1.0.4 doesn&#8217;t include the latest checked in xmpp.class.php</strong></p>
<p><strong style="font-size:16px;"><u>Using jaxl4broadcast.class.php</u></strong></p>
<ul>
<li>Checkout the latest version of JAXL library from <a href="http://code.google.com/p/jaxl/source/checkout" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/jaxl/source/checkout&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/&wp-toolbar-fromtitle=How to broadcast a message to your Gtalk friends using JAXL?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >here</a></li>
<li>Open <em>config.ini.php</em>, replace <strong>myproductionuser</strong> => <strong>gmail id</strong> and <strong>password</strong> => <strong>gmail password</strong></li>
<li>Open <em>index.php</em>, replace <strong>jaxl.class.php</strong> => <strong>jaxl4broadcast.class.php</strong></li>
<li>Open command line window (for windows) and shell prompt (for *nix). Navigate to the checked out directory</li>
<li>From command prompt run <strong>php index.php</strong></li>
<li>If everything goes alright, you will see something like the image below</li>
<li>See list of <a href="http://code.google.com/p/jaxl/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/jaxl/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/&wp-toolbar-fromtitle=How to broadcast a message to your Gtalk friends using JAXL?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >known issues</a> if you are new to JAXL and having trouble</li>
</ul>
<p><img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/05/jaxl4broadcast.gif" alt="jaxl4broadcast" title="jaxl4broadcast" width="665" height="335" class="alignleft size-full wp-image-404" /></p>
<p>Other JAXL Extensions you may want to checkout:</p>
<ul>
<li>dzone@gtalkbots.com (<a href="http://code.google.com/p/jaxl/source/browse/trunk/jaxl4gmail.class.php" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/jaxl/source/browse/trunk/jaxl4gmail.class.php&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/&wp-toolbar-fromtitle=How to broadcast a message to your Gtalk friends using JAXL?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Source Code</a>)</li>
<li>Sending custom out-of-office mails in Gmail (<a href="http://code.google.com/p/jaxl/source/browse/trunk/jaxl4dzone.class.php" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/jaxl/source/browse/trunk/jaxl4dzone.class.php&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/&wp-toolbar-fromtitle=How to broadcast a message to your Gtalk friends using JAXL?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Source Code</a>)</li>
</ul>
<p>Happy Broadcasting!</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/eaThizLHaAE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/05/how-to-broadcast-a-message-to-your-gtalk-friends-using-jaxl/</feedburner:origLink></item>
		<item>
		<title>Konami Code on Facebook : How to implement it on your site</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/ivti1UhLJbk/</link>
		<comments>http://abhinavsingh.com/blog/2009/05/konami-code-on-facebook-how-to-implement-it-on-your-site/#comments</comments>
		<pubDate>Tue, 19 May 2009 17:46:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[cheat code]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Konami Code]]></category>
		<category><![CDATA[lens flare]]></category>
		<category><![CDATA[Video Game]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=359</guid>
		<description><![CDATA[Yesterday while chatting with friends, I discovered an unusual thing on facebook. Unusual because I didn&#8217;t see any sense in what I saw back then. The process to discover this unusual thing is as follows:
How to view lens flare on facebook
1. Login to facebook.com
2. Click once anywhere on your home page
3. Click the following sequence [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/yEuCJ_3yZpGKEiW2x6oYGFnSfKU/0/da"><img src="http://feedads.g.doubleclick.net/~a/yEuCJ_3yZpGKEiW2x6oYGFnSfKU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/yEuCJ_3yZpGKEiW2x6oYGFnSfKU/1/da"><img src="http://feedads.g.doubleclick.net/~a/yEuCJ_3yZpGKEiW2x6oYGFnSfKU/1/di" border="0" ismap="true"></img></a></p><p>Yesterday while chatting with friends, I discovered an unusual thing on <a href="http://facebook.com" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://facebook.com&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/konami-code-on-facebook-how-to-implement-it-on-your-site/&wp-toolbar-fromtitle=Konami Code on Facebook : How to implement it on your site&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >facebook</a>. Unusual because I didn&#8217;t see any sense in what I saw back then. The process to discover this unusual thing is as follows:</p>
<p><strong style="font-size:18px;">How to view lens flare on facebook</strong><br />
1. Login to facebook.com<br />
2. Click once anywhere on your home page<br />
3. Click the following sequence of characters using your keyboard<br />
4. <strong>Up</strong>, <strong>Up</strong>, <strong>Down</strong>, <strong>Down</strong>, <strong>Left</strong>, <strong>Right</strong>, <strong>Left</strong>, <strong>Right</strong>, <strong>B</strong>, <strong>A</strong>, <strong>Enter Key</strong><br />
5. Click again on the page or try to scroll the page up or down</p>
<p>If everything is done correctly you will see something like this:<br />
<img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/05/lensflare-1024x619.jpg" alt="lensflare on facebook" title="lensflare on facebook" width="650" class="alignleft size-large wp-image-360" style="padding:3px;border:1px solid #CCCCCC;"/></p>
<p>On more investigation I found out this unusual thing is nothing but &#8220;<a href="http://en.wikipedia.org/wiki/Konami_Code" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://en.wikipedia.org/wiki/Konami_Code&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/konami-code-on-facebook-how-to-implement-it-on-your-site/&wp-toolbar-fromtitle=Konami Code on Facebook : How to implement it on your site&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Konami Code</a>&#8220;, which is a cheat code that appears in many Konami video games. The Konami code was introduced to many gamers in the 1988 NES version of <strong>Contra</strong>. Due to the game&#8217;s intense difficulty, many Contra players became reliant on the cheat code, which increased the player&#8217;s lives from 3 to 30 (9 to 90 including continues), to finish the game. The game&#8217;s popularity, combined with the near-necessity of using the code, made it renowned to an entire generation of video game players. This led to the code being used in countless games, and even mentioned across popular culture.</p>
<p>Once the cheat code is entered, facebook extends it to enable <a href="http://en.wikipedia.org/wiki/Lens_flare" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://en.wikipedia.org/wiki/Lens_flare&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/05/konami-code-on-facebook-how-to-implement-it-on-your-site/&wp-toolbar-fromtitle=Konami Code on Facebook : How to implement it on your site&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Lens Flare</a> on all the pages you visit thereafter. You can use the below code, to enable-disable komani code on your site, and thereafter extend it to anything you want to:</p>
<pre class="html" name="code">
  &lt;head&gt;
    <script type="text/javascript">
      var $ = {
        enabled: false,
        tmp: Array(),
        _konamiCode: Array(65,66,39,37,39,37,40,40,38,38),
        init: function() {
          this.tmp = Array(65,66,39,37,39,37,40,40,38,38);
        },
        konamiCode: function(e) {
          if(!this.enabled) {
            var t = this.tmp.pop();
            if((e.keyCode-t) == 0) {
              if(this.tmp.length == 0) {
                this.enabled = true;
              }
            }
            else {
              this.init();
            }
          }
          else {
            this.action();
          }
        },
        // Change the action() function to whatever you want to
        action: function() {
          alert("Konami Code Activated");
        }
      }
    </script>
  &lt;/head&gt;
  &lt;body onload="$.init()" onkeydown="$.konamiCode(event)"&gt;
  &lt;/body&gt;</pre>
<p>Try out once on facebook and then come back to grab it for your site.<br />
Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/ivti1UhLJbk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/05/konami-code-on-facebook-how-to-implement-it-on-your-site/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/05/konami-code-on-facebook-how-to-implement-it-on-your-site/</feedburner:origLink></item>
		<item>
		<title>Getting Google Page Rank using Javascript – For Adobe AIR Apps</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/DInt31brBeU/</link>
		<comments>http://abhinavsingh.com/blog/2009/04/getting-google-page-rank-using-javascript-for-adobe-air-apps/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 18:56:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Page Rank]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=352</guid>
		<description><![CDATA[Last week while working on SEO Analyzer v 1.1 desktop application, I faced a challenge of getting google page rank for a particular site using javascript. I am not sure if someone has already done this before, but I thought of sharing this javascript code for all adobe air and web developers out there. 
googlepagerank.js

var [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/ichrTEMxzQth5NoLzsJhVLGl3eo/0/da"><img src="http://feedads.g.doubleclick.net/~a/ichrTEMxzQth5NoLzsJhVLGl3eo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ichrTEMxzQth5NoLzsJhVLGl3eo/1/da"><img src="http://feedads.g.doubleclick.net/~a/ichrTEMxzQth5NoLzsJhVLGl3eo/1/di" border="0" ismap="true"></img></a></p><p>Last week while working on <a target="_blank" href="http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/">SEO Analyzer v 1.1</a> desktop application, I faced a challenge of getting google page rank for a particular site using javascript. I am not sure if someone has already done this before, but I thought of sharing this javascript code for all adobe air and web developers out there. </p>
<p><strong style="font-size:18px;"><u>googlepagerank.js</u></strong></p>
<pre class="javascript" name="code">
var googlepagerank = {
	hexdec: function(hex_string) {
	    hex_string = (hex_string+'').replace(/[^a-f0-9]/gi, '');
	    return parseInt(hex_string, 16);
	},
	count: function( mixed_var, mode ) {
	    var key, cnt = 0;
	    if( mode == 'COUNT_RECURSIVE' ) mode = 1;
	    if( mode != 1 ) mode = 0;
	    for (key in mixed_var){
	        cnt++;
	        if( mode==1 &#038;&#038; mixed_var[key] &#038;&#038; (mixed_var[key].constructor === Array || mixed_var[key].constructor === Object) ){
	            cnt += count(mixed_var[key], 1);
	        }
	    }
	    return cnt;
	},
	sizeof: function( mixed_var, mode ) {
	    return googlepagerank.count( mixed_var, mode );
	},
	ord: function(string) {
	    return (string+'').charCodeAt(0);
	},
	strlen: function(string) {
	    var str = string+'';
	    var i = 0, chr = '', lgth = 0;
	    var getWholeChar = function (str, i) {
	        var code = str.charCodeAt(i);
	        var next = '', prev = '';
	        if (0xD800 <= code &#038;&#038; code <= 0xDBFF) {
	            if (str.length <= (i+1))  {
	                throw 'High surrogate without following low surrogate';
	            }
	            next = str.charCodeAt(i+1);
	            if (0xDC00 > next || next > 0xDFFF) {
	                throw 'High surrogate without following low surrogate';
	            }
	            return str[i]+str[i+1];
	        } else if (0xDC00 <= code &#038;&#038; code <= 0xDFFF) {
	            if (i === 0) {
	                throw 'Low surrogate without preceding high surrogate';
	            }
	            prev = str.charCodeAt(i-1);
	            if (0xD800 > prev || prev > 0xDBFF) {
	                throw 'Low surrogate without preceding high surrogate';
	            }
	            return false;
	        }
	        return str[i];
	    };
	    for (i=0, lgth=0; i < str.length; i++) {
	        if ((chr = getWholeChar(str, i)) === false) {
	            continue;
	        }
	        lgth++;
	    }
	    return lgth;
	},
	substr: function(f_string,f_start,f_length ) {
			f_string += '';
			if(f_start < 0) {
					f_start += f_string.length;
			}
			if(f_length == undefined) {
					f_length = f_string.length;
			} else if(f_length < 0){
					f_length += f_string.length;
			} else {
					f_length += f_start;
			}
			if(f_length < f_start) {
					f_length = f_start;
			}
			return f_string.substring(f_start, f_length);
	},
	zeroFill: function(a, b){
		z = googlepagerank.hexdec(80000000);
		if (z &#038; a) {
			a = (a >> 1);
			a &#038;= (~ z);
			a |= 0x40000000;
			a = (a >> (b - 1));
		}
		else {
			a = (a >> b);
		}
		return a;
	},
	mix: function(a, b, c){
		a -= b; a -= c; a ^= (this.zeroFill(c, 13));
		b -= c; b -= a; b ^= (a << 8);
		c -= a; c -= b; c ^= (this.zeroFill(b, 13));
		a -= b; a -= c; a ^= (this.zeroFill(c, 12));
		b -= c; b -= a; b ^= (a << 16);
		c -= a; c -= b; c ^= (this.zeroFill(b, 5));
		a -= b; a -= c; a ^= (this.zeroFill(c, 3));
		b -= c; b -= a; b ^= (a << 10);
		c -= a; c -= b; c ^= (this.zeroFill(b, 15));
		return new Array(a, b, c);
	},
	ch: function(url){
		length = googlepagerank.sizeof(url);
		a = 0x9E3779B9;
		b = 0x9E3779B9;
		c = 0xE6359A60;
		k = 0;
		len = length;
		while (len >= 12) {
			a += (url[k + 0] + (url[k + 1] << <img src='http://abhinavsingh.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> + (url[k + 2] << 16) + (url[k + 3] << 24));
			b += (url[k + 4] + (url[k + 5] << <img src='http://abhinavsingh.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> + (url[k + 6] << 16) + (url[k + 7] << 24));
			c += (url[k + 8] + (url[k + 9] << <img src='http://abhinavsingh.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> + (url[k + 10] << 16) + (url[k + 11] << 24));
			m = this.mix(a, b, c);
			a = m[0]; b = m[1]; c = m[2];
			k += 12;
			len -= 12;
		}
		c += length;
		switch (len) {
			case 11: c += (url[k + 10] << 24);
			case 10: c += (url[k + 9] << 16);
			case 9:  c += (url[k + 8] << 8);
			case 8:  b += (url[k + 7] << 24);
			case 7:  b += (url[k + 6] << 16);
			case 6:  b += (url[k + 5] << 8);
			case 5:  b += (url[k + 4]);
			case 4:  a += (url[k + 3] << 24);
			case 3:  a += (url[k + 2] << 16);
			case 2:  a += (url[k + 1] << 8);
			case 1:  a += (url[k + 0]);
		}
		m = this.mix(a, b, c);
		return m[2];
	},
	strord: function(string){
		var result = new Array();
		for (i = 0; i < googlepagerank.strlen(string); i++) {
			result[i] = googlepagerank.ord(string[i]);
		}
		return result;
	},
	gethash: function(url) {
		return this.ch(this.strord("info:" + url));
	},
	getpr: function(baseurl) {
		var query = "";
		query += "http://toolbarqueries.google.com/search";
		query += "?client=navclient-auto";
		query += "&#038;hl=en";
		query += "&#038;ch=6"+googlepagerank.gethash(baseurl);
		query += "&#038;ie=UTF-8";
		query += "&#038;oe=UTF-8";
		query += "&#038;features=Rank";
		query += "&#038;q=info:"+baseurl;

		var req = new XMLHttpRequest();
		req.onreadystatechange = function(){
			if (req.readyState == 4) {
				var str = req.responseText;
				var pagerank = googlepagerank.substr(str, 9, 2);
				alert(pagerank);
			}
		}
		req.open('GET', query, true);
		req.send(null);
	}
}</pre>
<p><strong style="font-size:18px;"><u>How to use script in an adobe air application</u></strong></p>
<pre class="php" name="code"><html>
	<head>

        <script type="text/javascript" src="lib/air/AIRAliases.js"></script>
        <script type="text/javascript" src="lib/air/googlepagerank.js"></script>
		<script type="text/javascript">
			googlepagerank.getpr("http://abhinavsingh.com/blog");
		</script>
	</head>
    <body>

    </body>
</html></pre>
<p><strong style="font-size:18px;"><u>How to use script in an web applications</u></strong><br />
This script cannot be used directly for web applications, mainly because of cross domain XHR limitations. However the script can be modified to use with proxy script provided at <a href="http://developer.yahoo.com/javascript/howto-proxy.html" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://developer.yahoo.com/javascript/howto-proxy.html&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/04/getting-google-page-rank-using-javascript-for-adobe-air-apps/&wp-toolbar-fromtitle=Getting Google Page Rank using Javascript &#8211; For Adobe AIR Apps&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >developer.yahoo.com</a> </p>
<p><strong>Please Note:</strong> Getting google page rankings is/might be illegal as per google's policy. If you use this script from webservers, possibilities are google might block your server IP Address. However with adobe air applications (desktop apps), risk is minimized.</p>
<p>Enjoy and Do leave a comment.</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/DInt31brBeU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/04/getting-google-page-rank-using-javascript-for-adobe-air-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/04/getting-google-page-rank-using-javascript-for-adobe-air-apps/</feedburner:origLink></item>
		<item>
		<title>SEO Analyzer – Version 1.1 – What’s New?</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/L18fGtDZjaU/</link>
		<comments>http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 22:10:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Desktop Application]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SEO Analyzer]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=333</guid>
		<description><![CDATA[While SEO Analyzer v 1.0 focused primarily on getting page ranks and analyzing back links to your site url, SEO Analyzer v 1.1 adds another feather to the cap. It allows you to achieve following analysis:
Feature List:

Get google page rank for input site url
Get all backlinks to the input site url
Get the exact href tag [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/DaYTfSon7yQtpcCEhD3rK7jr3h4/0/da"><img src="http://feedads.g.doubleclick.net/~a/DaYTfSon7yQtpcCEhD3rK7jr3h4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/DaYTfSon7yQtpcCEhD3rK7jr3h4/1/da"><img src="http://feedads.g.doubleclick.net/~a/DaYTfSon7yQtpcCEhD3rK7jr3h4/1/di" border="0" ismap="true"></img></a></p><p>While <a target="_blank" href="http://abhinavsingh.com/blog/2009/04/introducing-seo-analyzer/">SEO Analyzer v 1.0</a> focused primarily on getting page ranks and analyzing back links to your site url, <strong>SEO Analyzer v 1.1</strong> adds another feather to the cap. It allows you to achieve following analysis:</p>
<p><strong style="font-size:18px;"><u>Feature List:</u></strong></p>
<ul>
<li>Get google page rank for input site url</li>
<li>Get all backlinks to the input site url</li>
<li>Get the exact href tag (rel=&#8221;nofollow&#8221;, target=&#8221;_blank&#8221;, etc) used by the back linking sites</li>
<li>Get google page rank for the back linking sites</li>
<li>Get google and yahoo ranking for the input site for keyword(s)</li>
<li>And a lot more &#8230;.</li>
</ul>
<p><strong style="font-size:18px;"><u>Installation:</u></strong></p>
<ul>
<li>Download and Install <a target="_blank" href="http://get.adobe.com/air/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://get.adobe.com/air/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/&wp-toolbar-fromtitle=SEO Analyzer &#8211; Version 1.1 &#8211; What&#8217;s New?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Adobe AIR</a></li>
<li>Download and Install <a target="_blank" href="http://code.google.com/p/seoanalyzer/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/seoanalyzer/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/&wp-toolbar-fromtitle=SEO Analyzer &#8211; Version 1.1 &#8211; What&#8217;s New?&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >SEO Analyzer v 1.1</a></li>
</ul>
<p><strong style="font-size:18px;"><u>Demonstration:</u></strong></p>
<p>Here in pictures is a small demonstration of what all can be achieved with SEO Analyzer 1.1:</p>
<p><strong>1. Start SEO Analyzer v 1.1</strong><br />
<img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/04/seoanalyzerv11-1.jpg" alt="seoanalyzerv11-1" title="seoanalyzerv11-1" width="353" height="502" class="alignleft size-full wp-image-337" /></p>
<p><strong>2. Enter Site url you want to analyze and keywords (optional) for which you want to analyze</strong><br />
<img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/04/seoanalyzerv11-2.jpg" alt="seoanalyzerv11-2" title="seoanalyzerv11-2" width="353" height="502" class="alignleft size-full wp-image-338" /></p>
<p><strong>3. Hit Enter or Analyze to start analysis &#8211; All backlinks</strong><br />
<img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/04/seoanalyzerv11-3.jpg" alt="seoanalyzerv11-3" title="seoanalyzerv11-3" width="352" height="502" class="alignleft size-full wp-image-339" /></p>
<p><strong>4. Get input site&#8217;s ranking for analyzed keywords</strong><br />
<img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/04/seoanalyzerv11-4.jpg" alt="seoanalyzerv11-4" title="seoanalyzerv11-4" width="353" height="503" class="alignleft size-full wp-image-340" /></p>
<p><strong style="font-size:18px;"><u>To-Do&#8217;s:</u></strong></p>
<ul>
<li>Export the keyword analysis results as CSV file</li>
<li>Compare keyword analysis results for two sites</li>
<li>Find appropriate keywords for a particular web page</li>
</ul>
<p>Enjoy SEO Analysis,<br />
Awaiting Your Feedbacks <img src='http://abhinavsingh.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/L18fGtDZjaU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/</feedburner:origLink></item>
		<item>
		<title>Introducing SEO Analyzer</title>
		<link>http://feedproxy.google.com/~r/abhinavsingh/~3/hGikwlbIj4M/</link>
		<comments>http://abhinavsingh.com/blog/2009/04/introducing-seo-analyzer/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 16:47:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Desktop Application]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SEO Analyzer]]></category>

		<guid isPermaLink="false">http://abhinavsingh.com/blog/?p=324</guid>
		<description><![CDATA[SEO Analyzer is a desktop based application build specifically for page rank checking and link analysis for seo purpose. It is built using Adobe AIR.
Note: SEO Analyzer v 1.1 is out. Read more about it here
Installation:

Download and Install Adobe AIR
Download and Install SEO Analyzer

Features:
The tool currently provides the following features:

Retrieve Page Rank for a particular [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/Vfw574047DSfwu8yRApbrMTGPsc/0/da"><img src="http://feedads.g.doubleclick.net/~a/Vfw574047DSfwu8yRApbrMTGPsc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Vfw574047DSfwu8yRApbrMTGPsc/1/da"><img src="http://feedads.g.doubleclick.net/~a/Vfw574047DSfwu8yRApbrMTGPsc/1/di" border="0" ismap="true"></img></a></p><p>SEO Analyzer is a desktop based application build specifically for page rank checking and link analysis for seo purpose. It is built using Adobe AIR.</p>
<p><strong>Note: SEO Analyzer v 1.1 is out. Read more about it <a href="http://abhinavsingh.com/blog/2009/04/seo-analyzer-version-11-whats-new/">here</a></strong></p>
<p><strong>Installation:</strong></p>
<ul>
<li>Download and Install <a target="_blank" href="http://get.adobe.com/air/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://get.adobe.com/air/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/04/introducing-seo-analyzer/&wp-toolbar-fromtitle=Introducing SEO Analyzer&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >Adobe AIR</a></li>
<li>Download and Install <a target="_blank" href="http://code.google.com/p/seoanalyzer/" onclick="window.open('http://abhinavsingh.com/blog/wp-content/plugins/wordpress-toolbar/toolbar.php?wp-toolbar-tourl=http://code.google.com/p/seoanalyzer/&wp-toolbar-fromurl=http://abhinavsingh.com/blog/2009/04/introducing-seo-analyzer/&wp-toolbar-fromtitle=Introducing SEO Analyzer&wp-toolbar-blogurl=http://abhinavsingh.com/blog&wp-toolbar-blogtitle=Abhi\'s Weblog','wordpress-toolbar');return false;" >SEO Analyzer</a></li>
</ul>
<p><strong>Features:</strong><br />
The tool currently provides the following features:</p>
<ul>
<li>Retrieve Page Rank for a particular web url</li>
<li>Get all incoming links for the entered url</li>
<li>Get page rank for the sites linking back to the entered url</li>
</ul>
<p><img src="http://abhinavsingh.com/blog/wp-content/uploads/2009/04/seoanalyzer.jpg" alt="seoanalyzer" title="seoanalyzer" width="353" height="504" class="alignleft size-full wp-image-331" /></p>
<p>Suggestions for future enhancements are welcomed.</p>
<img src="http://feeds.feedburner.com/~r/abhinavsingh/~4/hGikwlbIj4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://abhinavsingh.com/blog/2009/04/introducing-seo-analyzer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://abhinavsingh.com/blog/2009/04/introducing-seo-analyzer/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 2.763 seconds -->
