- win32std is not php-gtk
42 settimane 5 giorni fa - php gtk windows extension exists
43 settimane 4 giorni fa - Added capabilities
44 settimane 1 giorno fa - GtkHtml-3.0.dll missing error
46 settimane 4 giorni fa - No PHP 6
1 anno 15 settimane fa - Recurring question!
1 anno 18 settimane fa - Use the forum for support questions
1 anno 22 settimane fa - PHP-GTK installation complements for Ubuntu 10.04 Natty Narwhal
1 anno 22 settimane fa - Article restored: who's willing to do the others ?
1 anno 22 settimane fa - you can use COM with WScript.Shell or the REG command in Windows
1 anno 39 settimane fa


phpISO is very small, but very easy to use and very fast.
It only works under Linux! You enter a device, for example
commenti
alternative
Not sure what the point is ; it seems to be equivalent to:
cat /dev/cdrom > image.isoyes
yes, but it's graphical application. It would be interesting to show a progress bar. Don't know how to get ISO size.
perhaps a solution for size
this function works for CD, CD audio, but not exactly right size returned ; but does not works for DVD (return 50% of real size) ; may not work with multi-session CD/DVD.
<?php
function seek_size($dev, $debug=false) {
$dev = @fopen($dev,"r");
if (!$dev) return FALSE;
$size = 0;
$block_size = 1024 * 1000;
/* should return file size ; does not work with /dev/cdrom devices
fseek($dev, 0, SEEK_END);
$filesize = ftell($dev);
if($pos === false)
echo "ftell error\n";
else
echo "filesize = $filesize\n";
*/
$size = 0;
$block_size = 1024 * 1000 * 10;
while (fseek($dev, $block_size, SEEK_CUR) != -1) {
$size++;
$pos = ftell($dev);
if($pos == false)
echo "error\n";
elseif($debug){
echo "."; flush();
}
}
fclose($dev);
if($debug){
echo "size = $size\n";
echo "pos = $pos\n";
}
return $size;
}
?>
DVD size
For DVDs and larger media, you have to take into account the fact that the size is larger than 2GB, meaning traditional (signed) long integers, which are 31 bits wide, will suffer from folding. Even unsigned integers, at 32 bits, will be truncated too.
Using either GMP or bcmath to obtain arbitrary precision might be required.
Progressbar
Hi,
I didn't add a progressbar because I wanted to avoid traffic.
But I think I will add a progressbar. But first I have to find a solution for getting the size of a CD.
size info
- for DVD, there is an external command available on linux : lsdvd ; there is some options and is easy parsable.
- for IO, I think you should use IO_add_watch ; this allow a non-blocking IO system. Here is the synopsys :
- $conditions = (Gtk::IO_IN, Gtk::IO_OUT, IO_PRI, IO_ERR, IO_HUP, IO_NVAL);
- $id = io_add_watch($stream_rsrc, $condition, $callback);
- $id = io_add_watch($stream_rsrc, $condition, $callback, $priority);
you can find some sample script here or anywhere.
phpISO 0.2
Hi,
I finished phpISO 0.2.
phpISO 0.2 need
dfto get the size of the CD. The CD has also to be mounted.Have fun ;)