Re: Parsing question from newbie
| From: | Gyozo Papp | Date: | Sun, 05 Aug 2001 16:39:02 +0000 |
| Subject: | Re: Parsing question from newbie | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61335@lists.php.net to get a copy of this message | ||
Hi,
I think you should change the last line to: echo $head[1];
for further info visit the page: http://www.php.net/eregi
http://www.php.net/ereg
----- Original Message -----
From: "Craig Westerman" <westerman@chanuteks.com>
To: "PHP-General" <php-general@lists.php.net>
Sent: 2001. augusztus 5. 16:56
Subject: [PHP] Parsing question from newbie
> 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
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>