Is it possible to retrieve the page title of another page via php? I'd like to set up a link on PAGE A that points to PAGE B and create it so that:
Code: Select all
<a href="pageB"><?php constant changing title of page B ?></a>Moderator: General Moderators
Code: Select all
<a href="pageB"><?php constant changing title of page B ?></a>Code: Select all
$contents = file_get_contents($pageB);
$title = substr($contents, (stripos($contents, '<title>') + 7), (stripos($contents, '</title>') - stripos($contents, '<title>')));
echo "<a href=\"{$pageB}\">{$title}</a>";