i figured it would be easy, lol.
here is the code:
<?php
$myip = '154.5.91.147';
$file = fopen ("http://$myip/catacomb1/", "r");
if (!$file) { echo "<p>Unable to open remote file.\n"; exit; }
while (!feof ($file)) { $line = fgets ($file, 1024); if (eregi ("<title>(.*)</title>", $line, $out)) { $title = $out[1]; break; }}
fclose($file);
echo "<p><h3>$title</h3></p>";
$file = fopen ("http://$myip/catacomb1/counter.txt", "r");
if (!$file) { echo "<p>Unable to open remote file.\n"; exit; }
while (!feof ($file)) {
$line = fgets ($file, 1024);
$cou = $line+1;
break;
}
fclose($file);
$file = fopen ("http://$myip/catacomb1/counter.txt", "w");
if (!$file) { echo "<p>Unable to open remote file.\n"; exit; }
fwrite($file, $cou);
break;
fclose($file);
...
the rest of the script
?>
the title line finder works and outputs the page title correctly,
but it gets me error above opon trying to write to the file
ps ty for help.