Raggaer
Godly Member
Maybe someone finds an use for this, what it does :
http://4.ii.gl/EohwsP.png
http://3.ii.gl/MLCfp.png
And the code :
It will write all the console output into the file you want, then you can load it with jQuery or something :3
http://4.ii.gl/EohwsP.png
http://3.ii.gl/MLCfp.png
And the code :
Code:
$h = popen('cd /ot/forgottenserver && ./tfs', 'r');
if ($h) {
while (!feof($h)) {
$buf = fread($h, 1024);
$fileHandle = fopen("/var/www/public/stream.html", "a+");
if ($fileHandle) {
fwrite($fileHandle, $buf);
fclose($fileHandle);
}
}
pclose($h);
}
It will write all the console output into the file you want, then you can load it with jQuery or something :3