uwictech Posted October 22, 2009 Share Posted October 22, 2009 Hi all, On the Home page of a website that I have designed, I would like to show parts of other websites. The other websites contain information such as health monitors for different parts of the network. Another website may contain the temperatures in the server rooms. I would like to pull these all together on my home page like little port lets. Is this possible with PHP, or would something like java scrip be more useful? Jamie Link to comment https://forums.phpfreaks.com/topic/178613-solved-show-part-of-a-website-within-a-website/ Share on other sites More sharing options...
ILMV Posted October 22, 2009 Share Posted October 22, 2009 I guess you would be able to get the HTML and try and preg-match between two tags. Is the section of the website wrapped in a div with an id: <div id="status"><p>Foo</p></div> If so you could match against that and output the HTML yourself (might be an idea to cache it). Link to comment https://forums.phpfreaks.com/topic/178613-solved-show-part-of-a-website-within-a-website/#findComment-942029 Share on other sites More sharing options...
dreamlove Posted October 22, 2009 Share Posted October 22, 2009 use $content = file_get_contents("http://www.someothersites.com/url.html"); then use preg_match() to get what you need. But this is slow. So you can make your index PHP page to HTML page periodically. Link to comment https://forums.phpfreaks.com/topic/178613-solved-show-part-of-a-website-within-a-website/#findComment-942092 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.