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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to