PHP Array to binary file
Posted: Thu Feb 20, 2014 10:47 am
Hello folks!
Well, I have an unusual question about binary files. I want to store a PHP array in a binary file, but, one of the array elements will be the content of a zip file. I'll explain:
$array = Array('some_info' => 'the_info', 'another_info' => 'the_another_info', 'file_content' => $loaded_zip_file);
I want to write a new binary file with the array information and, once I can open this binary file, I will read the 'file_content' element and create a temporary file. Basically, I want to create a new kind of file and (I think) it must have a binary header, right?
A better explain: I need a zip file and some information within a file, like a packed file or a datafile (Allegro users will understand).
Thanks in advance my friends!
Best regards
Well, I have an unusual question about binary files. I want to store a PHP array in a binary file, but, one of the array elements will be the content of a zip file. I'll explain:
$array = Array('some_info' => 'the_info', 'another_info' => 'the_another_info', 'file_content' => $loaded_zip_file);
I want to write a new binary file with the array information and, once I can open this binary file, I will read the 'file_content' element and create a temporary file. Basically, I want to create a new kind of file and (I think) it must have a binary header, right?
A better explain: I need a zip file and some information within a file, like a packed file or a datafile (Allegro users will understand).
Thanks in advance my friends!
Best regards