Re: HTML page and php
| From: | Tularis | Date: | Thu, 21 Nov 2002 16:31:04 +0000 |
| Subject: | Re: HTML page and php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125435@lists.php.net to get a copy of this message | ||
Martin Johansson wrote:
How do I get a html page into a string variable in php? Isnt there any function working like this: $homepage = getHtmlPage(http://www.myhomepage.com/index.html); /Newbie try this:$file = file('http://www.myhomepage.com/index.html'); foreach($file as $key => $val){ echo "$val\r\n"; } /* $file will be an array where each index corresponds with a line from the file. so: 1 => <html> 2 => <head> 3 => <title>blah</title> etc. Hope that helps - Tularis