Thanks, i came to this code, which is much faster.
<?php
/**
* If any errors
* - Large file handle
* - 100mb to 200mb
* - unix grep use, tail etc
*/
error_reporting(E_ALL);
// File total size
$fsize = filesize("d:\\log24");
// for ini_set $fsize += 32 * 100 * 1024;
// ini_set("memory_limit", $fsize . "M");
// Set memory to use
ini_set("memory_limit","90M");
// Start and Download move
$send = 0;
// Set the chunk
$chunk = (2 << 20);
// Create large array.
$buffer = array();
// File resource
$ex = fopen("d:\\log24", "rb");
// Attempts to try
$i=0;
// Loop to get data as binary safe
while($send <= $fsize){
$buffer[$i] = explode('---', fread($ex,$chunk) );
$send += $chunk;
$i++;
}
// Close resource
fclose($ex);
// Clear send
unset ($send);
// Output the data
foreach($buffer as $key=>$value){
echo $key;
}
// Clear ram
unset($buffer);
// Exit
exit(0);
?>