Re: help - php script - no interaction

From: Date: Thu, 16 Oct 2008 17:26:34 +0000
Subject: Re: help - php script - no interaction
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-281990@lists.php.net to get a copy of this message
John Smtih wrote:
http://www.site1.com http://www.site2.com http://www.site3.com I have 3 sites above in a html. I do not want to create click each site, one at a time to see 1 page info. I want to write a script to go get all 3 sites, and bring it back into 1 page (the content of 3 pages concatinated). Is this doable in php? any other scripts? Thanks.
very messy but.. <?php $concatsites = file_get_contents('http://www.site1.com/'); $concatsites .= file_get_contents('http://www.site2.com/'); $concatsites .= file_get_contents('http://www.site3.com/'); echo $concatsites; ?> ps: you will have 3 full html pages concatenated together and echo'd out; but I guess you could easily extract the <body>'s and show them instead.. not really a commercial solution but suitable for a quick debug script/view for yourself

« previous php.general (#281990) next »