I am trying to parse just a couple html lines with php
// open url
$fp = fopen("http://search.nndb.com/search/nndb.cgi?type=unspecified&query=Ted+Radcliffe", "r");
$content = fread($fp, 3000);
fclose($fp);
$content = str_replace("\"", "", $content);
// echo http page to screen
echo $content;
// only get info between <tt> and </tt> tags
eregi( '<tt>(.*?)</tt>', $content, $regs );
echo "<br /><br />Died: " . $regs[0] . "<br />\n";
I am pretty sure I am on the right track, but I keep getting the REG_BADRPT warning, but I do not get the output I expect. Does anyone see what I keep missing? I have tried escaping () in any combination, but that doesn't seem to work.
Here is the script in action:
deadpool.php