#!/usr/bin/php -q php readchain.php {path to image} {cluster number} * * @author Bernd Holzmueller * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons Attribution-Share Alike 3.0 Germany * @copyright Copyright © 2010 tiggersWelt.net **/ require ('loadfat.php'); if (!is_object ($Image)) die ('Something went wrong...' . "\n"); // Retrive cluster $p = null; if (isset ($argv [2])) { if (substr ($argv [2], 0, 2) == '0x') $p = hexdec ($argv [2]); else $p = intval ($argv [2]); } // Output the chain echo '0x' . dechex ($p) . ' '; while ($p = $Image->getNextCluster ($p)) echo '0x' . dechex ($p) . ' '; echo "\n"; ?>