..modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they function. what we..
xAnalyze is a module that can search through corrupt data and configuration files in order to find the exact position of errors
<?php
/* Fetches data from files
Fetches data from a local or remote file.
PARAMETERS:
$sFile: file to fetch
RETURNS:
FALSE: failed to fetch filedata
STRING: data from specified file
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 12-11-2014
*/
function GetFileData($sFile){
global $_CONTEXT;
if(false===($rPointer = @fopen($sFile,"r"))){
$_CONTEXT['errors'][] = "Failed to open location <b>".$sFile."</b>";
return(false);
}
$sBuffer = "";
while(!feof($rPointer)){
$sBuffer .= fgets($rPointer,128);
}
fclose($rPointer);
return($sBuffer);
}
?>