How to get contents of 3rd party website into javascript variable?

Hello,

I am trying to write a little javascript program that runs on a local computer which will test if a website has high load or not.

So the javascript running on the Windows 7 computer needs to “call” a URL like this:

http://www.domain.com/load.php

The “load.php” file just has output like this:

1.0,2.0,3.0

(This is the 1/5/15 minute load averages.)

How can I get this webpage file output into a javascript variable?

Thanks!

The HTML-People example from the Bulletproof Ajax code page is a good example of how that is done.

I was not able to figure out how to do this… Can anyone post some sample javascript code?

Basically… something similar to “get_file_content()” function in PHP.

ie:

page_value = get_file_content(http://www.mywebsite.com/page.html);

Is this possible?

I also see at the microjs web site that there is an [URL=“http://microjs.com/#ajax”]Ajax section, inside of which is one called [URL=“http://code.google.com/p/microajax/”]MicroAjax that seems to do the job well.

That worked great. Thanks!