Asheeown Posted January 28, 2007 Share Posted January 28, 2007 I'm making a script that downloads files from a site http not ftp. Daily it gets updated with gz files some two or three times a day. So I made a database table where whenever it downloads a gzipped file it loads the name and date created into the table. But how can I get the contents of a folder when I'm not ftping to it? with that I can compare the last downloaded and download the most recent files Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/ Share on other sites More sharing options...
fert Posted January 28, 2007 Share Posted January 28, 2007 http://us2.php.net/manual/en/function.glob.php Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170966 Share on other sites More sharing options...
Asheeown Posted January 28, 2007 Author Share Posted January 28, 2007 Perfect fert plain and simple not giving me the answer but the chance to learn just what I need, Thank you. Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170970 Share on other sites More sharing options...
Asheeown Posted January 28, 2007 Author Share Posted January 28, 2007 Wait would this work if I was trying to get the contents of a folder on another site such as "http://www.test.com/directory" Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170973 Share on other sites More sharing options...
redarrow Posted January 28, 2007 Share Posted January 28, 2007 becouse you have added all the information to the database surly it would be easer to use a select then point to the correct file then download it via date added. Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170974 Share on other sites More sharing options...
Asheeown Posted January 28, 2007 Author Share Posted January 28, 2007 But this is an automated process so it would find the last file it has downloaded, checked for anymore created after that date and if so download those files Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170976 Share on other sites More sharing options...
redarrow Posted January 28, 2007 Share Posted January 28, 2007 nice one shere the code example cheers. Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170981 Share on other sites More sharing options...
Asheeown Posted January 28, 2007 Author Share Posted January 28, 2007 What? Their is just one thing I need to know and thats if glob works for finding the content for a website directory from a url Link to comment https://forums.phpfreaks.com/topic/36028-directory-contents/#findComment-170983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.