Re: Read output of a webpage
| From: | Steve Edberg | Date: | Tue, 02 Jan 2001 20:41:46 +0000 |
| Subject: | Re: Read output of a webpage | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32336@lists.php.net to get a copy of this message | ||
At 4:03 PM +0000 12/31/00, Cybercandy Ltd wrote:
Is there a simple way, in PHP, to read the output of a webpage rather than the HTML source? In other words I'm only interesting in using what appears in the browser window. TIA Allan www.cybercandy.co.ukI'm not entirely clear on what you mean, since the HTML source IS what is rendered to display the contents of the browser window. Are you looking, perchance, for some sort of screenshot utility? Are you trying to grab the entire page - HTML and images - to do some sort of processing on? If it's the latter, that is doable. You could fopen() the URL, save the HTML text in an array or string, and parse that to look for IMG SRC tags. Then, you'd have to fopen() each of those image URLs and grab the images. As always, check the code library sites (phpbuilder.com, etc.); someone might well have done this already. Also, if you want to grab an entire site in this way, you can use the wget tool, avaliable for Unixes and Windows. -steve +--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ |+-------------------------------------- FBI Special Agent Dale Cooper ---+