note 49559 added to function.get-meta-tags
| From: | timdotbennettathaveaniceplaydotcom at osu1 dot php dot net | Date: | Tue, 01 Feb 2005 15:43:04 +0000 |
| Subject: | note 49559 added to function.get-meta-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-84332@lists.php.net to get a copy of this message | ||
If you want to get the contents of tags other than meta you can use:
<?php
$page = "http://www.mysite.com/apage.php";
// tags
$start = '<atag>';
$end = '<\/atag>';
// open the file
$fp = fopen( $page, 'r' );
$cont = "";
// read the contents
while( !feof( $fp ) ) {
$buf = trim( fgets( $fp, 4096 ) );
$cont .= $buf;
}
// get tag contents
preg_match( "/$start(.*)$end/s", $cont, $match );
// tag contents
$contents = $match[ 1 ];
?>
----
Manual Page -- http://www.php.net/manual/en/function.get-meta-tags.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49559
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49559&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49559&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49559&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49559&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49559&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49559&report=yes
Search -- http://master.php.net/manage/user-notes.php