« April 2005 | Main | June 2005 »

May 11, 2005

It's Me, or Not...

Pretty much everyone has Self-Googled themselves at one point or another. Some people are just curious. However, some people have legitimate reasons, like celebrities who need to monitor what is being said about them or webmasters who need to monitor where in the search results they appear. This article even suggests you Self-Google once a day. That seems a little extreme, but I am noticing that the more I post to this blog, the higher up this site gets when I search for my name.

Here are some interesting pages about people who have the same name as me but are not me. Apparently, I not only saved many of America’s most prominent leaders from certain danger and possible death in 1919 but am also a convicted felon in England who is notorious for illegally exporting poison gas.

The list goes on...

Posted by Chuck at 02:24 PM | Comments (0) | TrackBack

May 06, 2005

What's the most popular number (under 976)?

I had never messed around with the Google Web APIs before so I figured I'd download them and give them a try. As a quick test, I queried each number between 0 and 976 (I tried for 1000 but my program timed out) to see which numbers were the most popular.

You can download the Java code here and you can see the list of results here. It took a few seconds for each query, so the whole program took well over an hour to run.

It looks like the most popular number was 1 with 340,000,000 results and the least popular number was 958 with 645,000 results. The only thing I am confused about is that the number of results I got using the API was different than the number of results Google's website gives. For example, when I searched for 1, the API told me there were about 340,000,000 results, but when I searched Google's Website, I was told there were about 1,490,000,000 results. I am sure there is a good reason for the difference, but I am just not sure what it is (nor have I bothered to research it)... If anyone knows the answer, please let me know.

Some other popular numbers were: 1 2 4 3 5 8 10 7 12 306 25 11 9

Some other unpopular numbers were: 958 959 884 948 897 969

By the way, sign up here to get your own Client Key, or do a search for "String clientKey =" to find some random ones people have accidentally posted on the web. You need a Client Key in order to submit your own queries to Google via the API.

Posted by Chuck at 04:39 PM | Comments (2) | TrackBack

May 05, 2005

Google Web Accelerator - A Small Hack

Google Labs released a Web Accelerator yesterday that is supposed to make your web surfing faster by serving you compressed pages and images right from Google's servers. From the site:

Google Web Accelerator is an application that uses the power of Google's global computer network to make web pages load faster. Google Web Accelerator is easy to use; all you have to do is download and install it, and from then on many web pages will automatically load faster than before.

I have seen this for dial-up connections from companies like NetZero and Netscape but not for a broadband connection like this. My first thought was that it must be using some sort of proxy server. This happened to be the case. However, it took me a while to get the specifics.

When Web Accelerator is turned on, you can go to Tools --> Internet Options --> Connections --> Lan Settings in Internet Explorer and see that "Use automatic configuration script" has been checked and an address of http://localhost:9100/proxy.pac has been entered. However, going to that page as well as http://localhost:9100 did nothing. I then decided to search my computer for proxy.pac but found nothing. Then, on a whim I decided to search for *.pac, which found one file: C:\Documents and Settings\Chuck\Local Settings\Temp\GoogleWebAccelerator.pac -- However, this file was locked by the application so I could not view, copy, move or delete it. There was nothing I could do to view the contents of this file and when I stopped the accelerator, the file disappeared.

I tried a number of things, including abruptly turning off the computer and restarting in Safe Mode, as well as creating a batch file with a continuous loop to try to copy the file to another location. My last thought was to download a Live Knoppix CD in order to try to read it directly from the file system but I did not feel like downloading a 700 meg file and running the CD when I wanted to know the contents of the file now.

I finally realized that when the Web Accelerator starts, GoogleWebAccelerator.pac has a size of 0 bytes. Once I go to a web page, the file increases to 2k or so. This told me that Internet Explorer must be going to http://localhost:9100/proxy.pac a single time and finding the proxy information. Then, GoogleWebAccelerator.pac fills with the same information which I could not access.

What I finally decided to do was use the Win32 implementation of wget from UnixUtils to view the file before Internet Explorer did and I was finally able to see the contents of proxy.pac / GoogleWebAccelerator.pac. The exact command was wget http://localhost:9100/proxy.pac. This places proxy.pac in the directory where you ran the command. Make sure to run this after starting the accelerator but before going into Internet Explorer. Here is what was inside (Pardon the formatting):

function FindProxyForURL_2831062(url, host) {
  return "DIRECT";
}

var private_re = new RegExp("^((0\\.0\\.0\\.0)|(127
\\.\\d+\\.\\d+\\.\\d+)|(10\\.\\d+\\.\\d+\\.\\d+)|(172\\.(1[6789]|2[0-
9]|3[01])\\.\\d+\\.\\d+)|(169\\.254\\.\\d+\\.\\d+)|(192\\.168
\\.\\d+\\.\\d+)|(22[3-9]\\.\\d+\\.\\d+\\.\\d+)|(2[3-5][0-9]
\\.\\d+\\.\\d+\\.\\d+)|([^.]*\\.[^.]*\\.google\\.com)|([^.]*))$");
var bypass_re = new RegExp("^((gmail\\.google\\.com)|
(.*windowsupdate\\.microsoft\\.com)|(.*download\\.windowsupdate\\.com))$");

function FindProxyForURL(url, host) {
if (host == "localhost" || host == "127.0.0.1")
return "DIRECT";
var url_proxy = FindProxyForURL_2831062(url, host);
if (private_re.test(host) ||
bypass_re.test(host) ||
url.substring(0,5) != "http:" ||
"DIRECT" != url_proxy
)
return url_proxy;
else
return "PROXY localhost:9100; " + url_proxy;
}

The JavaScript functions try to differentiate between local and Internet requests. If it is an Internet request, the String
"'PROXY localhost:9100; ' + url_proxy" is returned. Otherwise, the site is loaded using a DIRECT connection.

I have not dug too much further into this besides what I have just written. I just wanted to relay my experience of how I was able to see inside a locked file that required some tinkering in order gain access.

Posted by Chuck at 04:00 PM | Comments (7) | TrackBack