Hello,
this code is not working... whats wrong?
$filename = $_GET['page'];
$file = fopen($filename, "r");
if($file) {
while(!feof ($file)) {
$line = fgets($file, 1024);
if(preg_match('{[url]www.mypage.com[/url]}', $line, $out)) {
$title = $out[1];
break;
echo "string found!<br>";
}else{
echo "string not found!<br>";
}
}
fclose($file);
}
I placed the http://www.mypage.com in several <a href="http://www.mypage.com">my page</a> codes on the page i enter in $filename but still i only get "string not found!" 🙁
Pls help!