Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP class to create ISO image

Tags:

php

iso

iso-image

I wanted to know if this is possible?

I would like to create a cross platform Flash projector and files and than create an ISO from it for the user to download.

Google did not help me much so far...

like image 983
FFish Avatar asked Feb 22 '11 11:02

FFish


1 Answers

Of course it is possible to do directly from PHP.

However, as one of the comments to your question states, it's probably going to be easier to call an external binary to do the work for you (Although not all hosts may have mkisofs installed).

If you really must do this from PHP, here's some useful references for you.

ISO 9660 specification (ECMA-119) - This is the file format for "ISO" image files.

PHP pack() and unpack() - These will help you manipulate binary data in PHP.

Once you're familiar with the file structure, you may be able to create some pre-compiled segments, and just patch them at various offsets as well as inserting the payload.

Good luck!

like image 154
Leigh Avatar answered Oct 13 '22 00:10

Leigh