Hi I am new to PHP and hope someone can help me.
Sometimes the output from the executed shell script can be hundreds of lines long, the lines are separated with a <BR>
(replaced \n in shell script) for formatted html output.
So I need to know how to make the output paginated, I looked at some other similar solutions here but I couldn't make them work as they did different things.
$url = $_POST["website"];
$safeurl = escapeshellarg($url);
#passthru("./check -n ".$safeurl);
$stuff=shell_exec("./webcheck -n ".$safeurl);
$webFile = ($url.'.txt');
$write = $stuff;
$fh = fopen($webFile, 'w') or die("can't open file");
fwrite($fh, $write);
fclose($fh);
$fh = fopen($webFile, "r") or die("can't open file");
$frstuff=fread($fh, filesize($webFile));
fclose($fh);
echo $frstuff;