| 
<?php
 /**
 *
 * Explaining basic functionality of the iviDownloader class
 *
 * @author Moritz Heidkamp
 * @version $Id 1.0$
 * @copyright 2003
 **/
 
 require_once('iviDownloader.class.php');
 
 // Initialize iviDownloader
 $downloader =& new iviDownloader();
 
 // Get *.mpg, *.jpg and *.jpeg links from all URLs given in $_GET['url'] seperated by commas (,)
 // The second argument declares that previous results may be deleted (clear result list)
 // See iviDownloader.class.php for detailed information
 $downloader->get(explode(',', $_GET['url']), true, 'mpg|jpe?g');
 
 // Simply output results
 foreach($downloader->files as $url => $files)
 {
 print('<h1>Files from ' . $url . '</h1>');
 
 foreach ($files as $file) {
 print('<a href="' . $file . '">' . $file . '</a><br /><br />');
 }
 }
 
 
 // Download and save all result files to DOCUMENT_ROOT.
 // Each URL will get its own directory starting from 00001 ascending.
 // The second argument declares that the downloaded files will be renamed to numeric filenames with an ascending number.
 // The third argument declares that the file "info.txt" should be written.
 // See iviDownloader.class.php for detailed information
 
 //$downloader->save($_SERVER['DOCUMENT_ROOT'], true, true);
 
 ?>
 |