How to I write a Javascript to call an URL like ...

http://webservices.imacination.com/d...94132&x=25&y=4

And then get the "view source" into a string variable. I then want to parse the string variable to get the answer found on that page which is the distance between two zip codes.

Also I want people's opinion as to whether this is permissible. For example, this URL is labeled as a Free Web Services. And I did not see any notices forbidding such action. Plus the Javascript is only invoked when a user hits a button, so this is not a continuously automated query. The scraped data is not store nor republished.