Miscellany
public text v1 · immutable$filename = "../purebyteslab/team/index.php";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
$divs = explode("<div", $contents);
$divsnum = count($divs);
$i=1;
while($i<$divsnum){
$id = preg_replace("/id=\"/","", $divs[$i]);
$idexists = preg_match ( "/id=\"/", $divs[$i]);
if($idexists){
$div[$i-1] = preg_replace('/\"(.*.*)/s',"",$id);
}
else{
$div[$i-1] = "no name";
}
$i++;
}
fclose($handle);