Jump to content

reading from a specific byte


alin19

Recommended Posts

i have a file and i want to read from it from  byte 1024 for example,

and from each line i want only to read 8 bytes, i have this code, can you help me?

 

 

$handle = fopen("C:\Documents and Settings\Administrator\Desktop\sibiu\FuturesDeal.txt", "r");
if ($handle) {
    while (!feof($handle)) {
        $buffer = fgets($handle,;
        echo $buffer;
	echo ftell($handle);


    }

    fclose($handle);
}

,

Link to comment
https://forums.phpfreaks.com/topic/109711-reading-from-a-specific-byte/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.