I’m trying to create a simple webpage that post certain images after it has checked the webpage [url]http://10.10.1.5/text.html
var txAudioRate=’—‘;
or
var txAudioRate=’64k’;
or
if the page is unreachable or doesn’t exist to post the last image:
The line var txAudioRate exist on line 30 of the test.html, and I do not have access to change the file test.html. I’ve created my own page mypage.php so here is what I’ve come up with so far:
<?php
$farray = file(“
if(strpos($farray[30],”txAudioRate=’64k’;”)) {
echo “<img src=images”example1.jpg” alt=””>”;
}
else if(strpos($farray[30],”txAudioRate=’—‘;”)) {
echo “<img src=images”example2.jpg” alt=””>”;
}
else {
echo “<img src=images”example3.jpg” alt=””>”;
}
?>
Here is the problem I’ve run into so far. Even if the line txAudioRate=’64k’ or txAudioRate=’—‘ it always post example3.jpg.
Another problem is that if it can’t find the file, it post this long message Warning: file(text.html) [function.file]: failed to open stream: No such file or directory in c:Inetpubwwwrootmypage.php on line 12 instead of just posting the example3.jpg by itself. Any Ideas?