首先:我真的很喜欢这个网站,我认为这是最好的编程论坛 :)
现在到我的问题,我尝试使用代码和注释来显示:
$file = fopen ($URL, "r");
// $URL is a string set before, which is correct
// Also, I got the page-owners permission to acquire the page like that
if (!$file)
{
echo "<p>Could not open file.\n";
exit;
}
while (!feof ($file))
{
$buffer = fgets($file);
$buffer= strstr($buffer, "Montag</b>");
// If I don't use this line, the whole page gets displayed...
// If I use this line, only the first line after the needle gets displayed
echo $buffer;
}
fclose($file);
所以基本上,我可以显示整个页面,或者针后的一行,但不是针后的所有内容......
我尝试使用 PHP 参考、Stackoverflow 搜索引擎,当然还有 google 来找到解决方案,但我找不到解决方案,感谢所有愿意帮助我的人。
问候用户rr3