So far I have managed to write some code that should print the source of the page. The problem is, it doesn't. I tried it with another web site, and it printed it out fine, so I used wget on the page "http://www.whitepages.com/carrier_lookup?carrier=other&number_0=2165138899&response=1" which should download the page for me. It gave " ERROR 403: Forbidden. ", so I'm not really sure how to access the html now.
The second part of the problem is that when I manage to download the html and save it as a string, I need to save as a different string the carrier that the search found. This is accessible as the line under the [div class="carrier_result"] line in the source code. In the previous sentence I replaced the < and > with brackets because sourceforge would not let me post the html.
So far the code I have is: http://pastebin.com/u4HUv3Rj
Thanks to anyone who helps me with this.