When I try to ereg_replace from the line...
$line = "hello there, Patrick";
$name = ereg_replace ("hello there, (.*)", "\1", $line");
It works fine. $name is now "Patrick" as it should.
But when I take the $line from another server nothing happens.
$fd = fopen ("http://www.asite.com/greetings.html", "r");
while (!feof ($fd)) {
$line .= fgets($fd, 1024);
}
fclose ($fd);
$name = ereg_replace ("hello there, (.*)", "\1", $line");
When I try this $name is "hello there, Patrick", how do I fix this??