In php you can get the data from a URL with something like this $lines = file('http://mysite.com/info.php); foreach ($lines as $line) { echo "$line"; } Code (markup): so I can get whatever info.php outputs... How can I do that with javascript?
You can use an XMLHttpRequest to get the source of a page with javascript.. only if the requested page is on the same server as the page that the javascript is running on (this is commonly known as AJAX). Otherwise you will have to use a server-side script (run on your server) to return the requested (remote) page, kind of like a proxy, and only then you can use javascript to access the data retrieved. Some more info on XMLHTTPRequest: http://www.w3schools.com/XML/xml_http.asp