hstraf
1
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.
hstraf
3
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?
hstraf
5
That worked great. Thanks!