My OS=Apache
PHP v.4.3.1
Error message I'm getting:
"Warning: get_meta_tags(index.html) [function.get-meta-tags]: failed to create stream: No such file or directory in /home/prescri/public_html/sitemap1.php on line 91"
I have a sitemap creator that I am trying to edit to grab the <title> and <description> from the indexed files and use them for the hyperlink instead of just displaying the name of the file itself as the hyperlink. This is the code with my additions of the "get_meta_tag" portion:
chdir($chdir);
if(is_array($sfiles))
{
sort($sfiles);
reset($sfiles);
if(!isset($display))
{ $display = "both"; }
$sizeof = sizeof($sfiles);
for($y=0; $y<$sizeof; $y++)
$tags = get_meta_tags("$sfiles[$y]");
$title = $tags[title];
$descr = $tags[description];
{
if(ereg("php$", $sfiles[$y]) && ($display == "both" || $display == "PHP"))
{
echo "<tr><td>";
for($z=1; $z<=$count; $z++)
{ echo "<img align=absmiddle src=vertical.gif> "; }
if($y == ($sizeof -1))
{ echo "<img align=absmiddle src=verhor1.gif>"; }
else
{ echo "<img align=absmiddle src=verhor.gif>"; }
echo "<img align=absmiddle src=php.gif> ";
echo "<a href=http://$SERVER_NAME/$dir1/$sfiles[$y]>$title</a>- $descr</td></tr>";
}
elseif(ereg("(html|htm|shtml)$", $sfiles[$y]) && ($display == "both" || $display == "HTML"))
{
echo "<tr><td>";
for($z=1; $z<=$count; $z++)
{ echo "<img align=absmiddle src=vertical.gif> "; }
if($y == ($sizeof -1))
{ echo "<img align=absmiddle src=verhor1.gif>"; }
else
{ echo "<img align=absmiddle src=verhor.gif>"; }
echo "<img align=absmiddle src=html.gif> ";
echo "<a href=$prefix$dir1/$sfiles[$y]>";
echo "<a href=http://$SERVER_NAME/$dir1/$sfiles[$y]>$title</a>- $description</td></tr>";
}
}
echo "<tr><td>";
for($z=1; $z<=$count; $z++)
{ echo "<img align=absmiddle src=vertical.gif> "; }
echo "</td></tr>";
}
Appreciate any help, I'm still pretty new to this...I'm not really sure where I should be inserting my code, or if it's even the right code to insert.
Thanks
Bernadette