"; flush(); #Get cURL going with it $fd = popen("curl -O $address","r"); } echo "all done"; } # end of function # Now use the above function to get all files in the default directory with #getitall ("http://site.com/filename_[start]to[end].pdf",201,600,50); #A 'live' example is the release of the donors list at the bush campaign. (No connection with me whatsoever..;) So with this script try: getitall ("http://webevents.broadcast.com/georgewbush/pdf/91099_FEC_[start]to[end].pdf",1,900,50); /* We can delete the above three lines and if the name of the program is: http://www.site.com/progname.php3 We can call the function from the browser with: http://www.site.com/progname.php3?urlbase=http://site.com/filename_[start]to[end].pdf&start=201&end=600&increment=50 For the bush campaign: http://www.sonic.net/alain/curl/bushpdf.php3?urlbase=http://webevents.broadcast.com/georgewbush/pdf/91099_FEC_[start]to[end].pdf"&start=1&end=900&increment=50 */ ?>