Jump to content

[SOLVED] How to eat away a file?


resnow

Recommended Posts

I have a chunk of truly random data in a text file. I'd like my script to take the first two bytes of the data, store it, and then delete it from the file. This way the file would serve as a constant supply of fresh randomness.

 

The reading part is easy, thanks to "fread", but I couldn't figure out how to delete just the first two bytes from the file.

 

Help would be very much appreciated!

Link to comment
https://forums.phpfreaks.com/topic/113147-solved-how-to-eat-away-a-file/
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.