function __construct()
{
print "constructing,";
$this -> proxFile=fopen("file.cfg","r+"); //resource
print "test,";
$this -> ezText = file_get_contents("file.cfg");
print "test,";
}
and the user code is
?php include("EZprox.php");
$prox = new ezproxy;
$headerpos = strpos($prox->ezText , "###");
if ($headerpos === false) {
print "### was not found in <br/>";
print " $prox->ezText";
}else {
print "the string ### was found in <br/>";
print "at prossition $headerpos";
fseek($prox->proxFile, $headerpos);
$place=ftell($prox->proxFile);
print " $place";
$myline=fgets($prox->proxFile);
print "$myline \n <br/>";
fseek($prox->proxFile, strlen($myline));
fputs($prox->proxFile,"this is where i write <br/> \n");
print "$ezText" ;
fpassthru($prox->proxFile);
}
?>