undyboy91 Posted November 19, 2006 Share Posted November 19, 2006 Is it possible in a PHP script to load in an external webpage, analyze it and then display parts of that page? For example like a PHP script that suppose loads in the contents of say the main forum page here and displays the name of all the topics on that page by extracting the topic names from the HTML page. Link to comment https://forums.phpfreaks.com/topic/27730-possible-to-load-in-external-html-pages/ Share on other sites More sharing options...
trq Posted November 19, 2006 Share Posted November 19, 2006 Of course. You can get the file into a variable using [url=http://php.net/file_get_contents]file_get_contents[/url], then, if your lucky enough and the document is xhtml complient you could parse it with [url=http://php.net/simplexml]simplexml[/url], otherwise, its a pretty complex job to do it using regular expressions. Link to comment https://forums.phpfreaks.com/topic/27730-possible-to-load-in-external-html-pages/#findComment-126825 Share on other sites More sharing options...
undyboy91 Posted November 21, 2006 Author Share Posted November 21, 2006 oh ok cool! didnt know that! thanks! Link to comment https://forums.phpfreaks.com/topic/27730-possible-to-load-in-external-html-pages/#findComment-128174 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.