Parsing question from newbie
| From: | Craig Westerman | Date: | Sun, 05 Aug 2001 14:56:09 +0000 |
| Subject: | Parsing question from newbie | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-61331@lists.php.net to get a copy of this message | ||
I found this little script called grab'n & pars'n on the net. It looks like
it could be very useful to learn how it does what it does. While studying it
I came up with a question.
<?
$url = 'http://www.php.net';
$lines_array = file($url);
$lines_string = implode('', $lines_array);
eregi("<title>(.*)</title>", $lines_string, $head);
echo $head[0];
?>
It prints out:
<title>PHP: Hypertext Preprocessor</title>
How do I modify this to get what is between the TITLE tags and not include
the TITLE tags?
Thanks
Craig ><>
westerman@chanuteks.com