..will make a new module and not just some new module, nope let's make a fully automatic injection script! This tutorial is the first step into making this. Let's first explain what we're..
<?php
/* Convert each line of a file to an array
Opens a file and explode each line of the file by an optional
separation character, if the function is called with only the
filepath parameter, the "|" character will be used.
PARAMETERS:
$sFile: filepath to datafile
$sSeparate: the character words are separated by on each line(OPTIONAL)
RETURNS:
ARRAY: file data in multi-dimensional array (eg [0][1]: second element on first line)
FALSE: an error has occured
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 12-11-2014
*/
function RawToArray($sFile,$sSeparate="|"){
global $_CONTEXT;
if(!$aFileData = @file($sFile)){
$_CONTEXT['errors'][] = "Failed to open location <b>".$sFile."</b>";
return(false);
}
$aDataBuffer = array();
for($x=0;$x<count($aFileData);$x++){
if(!$aDataBuffer[$x] = @explode($sSeparate,$aFileData[$x])){
if($aFileData[$x]==""){
continue;
}
}
}
return($aDataBuffer);
}
?>