I am trying to strip out an html comment in a file. Using code stolen here, I can get most of what I want but am running into a problem taking out html comments. Using:
<?php
$url = 'http://somesite;
$title = "<!-- title -->)(<!-- author -->)";
$file = @file( $url, "r" );
$target = @implode( "\n", $file);
eregi($title, $target, $match);
echo "$title";
echo "$match[2]";
my echo of title is ()(). What I need to get is everything between the two.
Any ideas?
Joe