SEO Analyzer v 1.2 – Adding support for Bing along with Google and Yahoo

On May 28, 2009 Microsoft announced Bing which has now replaced Live search. And within 2 week of it’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 enable you to analyze a site’s ranking for a particular keyword on Bing search engine, along with Yahoo and Google search engines.

seoanalyzer-bing-support

SEO Analyzer Future Roadmap:

  • Saving reports on spreadsheets
  • Comparing two sites for a list of keywords
  • Keyword density extraction tool

Happy SEO Analysis!

Getting Google Page Rank using Javascript – For Adobe AIR Apps

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 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 && mixed_var[key] && (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 && 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 && 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 & a) {
			a = (a >> 1);
			a &= (~ 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] << 8) + (url[k + 2] << 16) + (url[k + 3] << 24));
			b += (url[k + 4] + (url[k + 5] << 8) + (url[k + 6] << 16) + (url[k + 7] << 24));
			c += (url[k + 8] + (url[k + 9] << 8) + (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 += "&hl=en";
		query += "&ch=6"+googlepagerank.gethash(baseurl);
		query += "&ie=UTF-8";
		query += "&oe=UTF-8";
		query += "&features=Rank";
		query += "&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);
	}
}

How to use script in an adobe air application


	
        Google Page Rank
        
        
		
	
    

    

How to use script in an web applications
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 developer.yahoo.com

Please Note: 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.

Enjoy and Do leave a comment.

How to integrate Google Friend Connect – In Pictures

I am probably one of the luckiest (if this is the case) to have got google friend connect invitation a couple of minutes back. And it really took me a few minutes (< 10) to setup Google Friend connect on Gtalkbots.

In Pictures:








http://google.com/friendconnect

Try out, if it clicks for your and others, you might get loads of traffic.

Warning for Google Chrome Users : Chrome’s ‘Save As’ Flaw Could Give Attackers Control

Bach Khoa Internetwork Security, a security-research firm in Vietnam, claims to be the first to discover a critical vulnerability in Google’s Chrome browser.

“This is the first critical Chrome vulnerability permitting [a] hacker to perform a remote code-execution attack and take complete control of the affected system,” the firm wrote in its Sept. 5 advisory. While four Chrome vulnerabilities were discovered, Bach Khoa said the “Save As” flaw is the only one that can allow an attacker to launch remote attacks from a victim’s PC. Other vulnerabilities just crash the browser.

The vulnerability is caused by a boundary error when handling the “Save As” function. When a user saves a malicious page with a title tag in the HTML code, the program causes a  stack-based overflow, according to Bach Khoa. A hacker could construct a specially crafted Web page that contains malicious code, trick a user into visiting that Web site, and
convince the user to save the page. That will execute the code and give the attacker privileges to remotely use the infected system.

A Google spokesperson said, “”We have released a fix to address this vulnerability. Users will get this fix through an automated update to the browser, so they will not have to take any action to be protected.”

Well I haven’t got any fix till now, atleast I didn’t see my Google Chrome updating atleast.

Read more on this news….

Cuil : New search engine from former Googlers.

Just came across this search engine http://www.cuil.com , which is supposedly from former Googlers or I must say rebellious googler. Cuil Inc (which is pronounced as Cool) claims that it can index faster and more cheaper, a far larger portion of the web than google.

The would-be Google rival says its service goes beyond prevailing search techniques that focus on Web links and audience traffic patterns and instead analyzes the context of each page and the concepts behind each user search request.

Personally from my experience it doesn’t give better search results for proper noun. For example querying my name doesn’t give my site at all. And when I query abhinavsingh.com, it gives some Chinese characters.

However interesting feature is giving search results with images, which is a derivation from Yahoo’s glue search. Glue search is the next upcoming revolutionary search from Yahoo, which brings in all the experience for your on one page. For instance try searching Metallica and you get the following beautiful results: http://in.glue.yahoo.com/?fr=sfp&ei=UTF-8&query=metallica&y=Search

Read more about the latest search engine on web here:
http://news.yahoo.com/s/nm/20080728/wr_nm/internet_search_dc

I thought google killed innovation outside Google, but No here are people proving it all wrong.

Its too much to handle for YouTube now : Finally its down

Hi,

Well I was just doing the daily maintenance of one of the sites I own where I have several youtube videos embedded. I noticed that I wasn’t able to embed some videos successfully which were there before yesterday. I tried changing my script 2-3 times, tried different method. Finally I thought of opening the video directly in the browser.

Bingo! Youtube is down for the first time in front of my eyes. Am I dreaming?

I did a quick:

  • ping youtube.com (Failed)
  • tracert youtube.com (Failed)
  • ping google.com (Success)

So indeed it was youtube that sucked for the first time. Find below a snap shot of the same.

You can clearly see that:

  • Server not found on browser
  • Top right window shows successful ping to google.com
  • Below two command line window shows failed ping and tracert of youtube servers.

For a bigger clear picture click here:
http://abhinavsingh.com/library/images/old-youtubedown.GIF

This is some news 😉

Critical Bug in Gmail integrated Chat

Well chat is a part of our day to day life (I use Gtalk). While chatting with my friends today who were using gmail integrated chat, I noticed that they were going offline every 2-3 minutes. Finally thanks to Sowmya Sudha, who came up with this critical bug in Gmail integrated chat. Here is what exactly happens when you chat using Gmail integrated chat:

Step 1: You open up a chat window to start chatting

Step 2: Pop out the chat box to get more space for writing and reading messages

Step 3: Now for some reason you decide to popin or close the poped out chat

And Bingo!

Your browser goes for a roll. Tested on Firefox and Flock. Surely will be same on Internet Explorer.

After failing to handle orkut apps efficiently, this is the second time I am seeing any critical bug from google. Are we going to see a downfall in google’s standards ??

Try out yourself.

iGoogle Portal Implementation: How to do it?

After developing the draggable div application the other day, I was itched to implement the whole iGoogle portal. Probably the drive came when a few of you asked me “These draggable divs are just like iGoogle”, so I thought why not to give a shot at it.

Here is what I was able to come up with while sitting idle at the office. I have shown 3 tabs for making it look more of a realistic demo. However only the news tab is operational as of now. Feel free to drag and drop any of the news box to any corner of the page and rest of the boxes will make place for it. 🙂

Find the implementation of this application here.

Basically it proved out to be a derivative of the previous application i.e. draggable div. However this one is a bit more modular, will easily fit into any changes made to the tabs and tab names or what ever.

Feel free to post a comment or two at the blog here.

Finally make your portals like iGoogle 😛

Will google be a new Library of Alexandria.

What if all the world’s information would be available and easy to find? What if all the news, all books, all texts, photographs and videos would be collected in one place, and made available, always and everywhere? This is the goal of Google, and the company seems to be realising its core mission at an amazing speed: through its popular search engine, through Google Earth, with which users can find any kind of information based on geography, and through Google Print, a project in which Google digitizes complete libraries.

Google is divulging ever more information, in the process hiring the smartest people in the industry. But is the company aware of the responsibility it has, being the guard to all the world’s information, including personal information about its users? With its motto ‘Don’t be evil’, Google seems to have the best intentions. But there are also claims that Google is slowly turning into Big Brother, keeping track of its users and continuously making decisions about the information it provides to an ever faster growing number of users.

Will Google turn out to be a new Library of Alexandria, serving as a middleman that brings all useful information to anyone? Or is it turning into a monopolistic Big Brother that challenges the freedom of information?

This documentary takes a look into the world of Google, in the company’s headquarters in Mountain View, California and in its London offices. We see –among others- Vint Cerf, named ‘the father’ of the Internet who explains the inner workings of Google as a company. Since 2004, Cerf has been working for Google, helping them to develop new applications for the Internet. What is his view on the development of the Internet, and on the role Google plays in today’s world?

Found the comments and matter discussed in the video really interesting so thought to finally blogging it. Hopefully we have a discussion coming up. 🙂

Gmail Type Attachment – How to make one?

Google and its wide range of web applications have simple changed the way we used to look at internet. Be it the revolutionary fast Google search engine or mail by Google i.e Gmail. You will find enormous amount of threads and forums discussing How do google achieve doing XYZ? or How do they make it happen fast and efficiently?.

One of the most talked about thing about Gmail is probably how do they achieve making Gmail so simple, convinient, sober, fast and easy. One of the Gmail’s feature which contribute hugely in making it easier and faster for users is: Its ability to attach your files while you are writing your mail.

I have tried to come up with an exact clone for gmail attachment. Kindly click here for the demo and the source files.

This is achieved by using an iframe which contains your server side script responsible for handling uploads. As soon as the user select a file to upload, the upload form gets submitted to upload.php, which lies in an iframe. Hence at no point does the user leaves the page and still he gets his file uploaded. Find attached below all the files you need to implement this on your server. Just unzip the file on your server, and you are ready. All the uploaded files will go in th upload folder by default. You may change that in upload.php.

Feel free to post a comment back here for any queries etc.

Cheers !