RE: [PHP] Getting the title of a web page
| From: | Adrian Ciutureanu | Date: | Wed, 11 Jul 2001 10:37:35 +0000 |
| Subject: | RE: [PHP] Getting the title of a web page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-57342@lists.php.net to get a copy of this message | ||
<?
$f = fopen($fileName, 'r');
$s = fread($f, 1024);
fclose($f);
$pageTitle = eregi_replace('.*<title>', '',
eregi_replace('</title>.*', '', $s));
?>
> -----Original Message-----
> From: Heiko Wilms [mailto:wilms@fga.mbau.fh-hannover.de]
> Sent: 11 iulie 2001 13:32
> To: php-general@lists.php.net
> Subject: [PHP] Getting the title of a web page
>
>
> Hi,
>
> when I open a web page within my php-script with fopen(...) I
> only want
> to get back the title of the page. How can I do this?
>
> Heiko
>
> --
> 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
>
>