shadowayex Posted March 1, 2011 Share Posted March 1, 2011 What I'm looking to do is parse the HTML output from a page on a different server. There's a page with some useful information that I would like to grab and use myself, but it is updated regularly. So, rather can copy the information and use it myself, I thought it'd be nice if I could load up that HTML into a DOMDocument and parse out the parts I want.I know what to do from the DOMDocument on, I just don't know how to get the HTML to put in the DOMDocument. How would I do that? Link to comment Share on other sites More sharing options...
Synook Posted March 1, 2011 Share Posted March 1, 2011 You can just use file_get_contents() over HTTP - if your host has disabled that, there are other functions you can use, such as cURL. Link to comment Share on other sites More sharing options...
jeffman Posted March 2, 2011 Share Posted March 2, 2011 The loadHTMLFile method works remotely. Have you tried that? Link to comment Share on other sites More sharing options...
shadowayex Posted March 2, 2011 Author Share Posted March 2, 2011 You can just use file_get_contents() over HTTP - if your host has disabled that, there are other functions you can use, such as cURL.This seemed to work for what I was doing. Thanks =) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.