Hi, I want to upload the files remotely, and that files should be stored in the folders depending on date. For example, if i am uploading abc.html on 8th July 2010 it should be stored like this xyz.com/2010/July/8/abc.html, if folder doesn't exists it should be create automatically. Please can any one help me?
To create the directories, you need a simple combination of the following functions: date() mkdir() is_dir() For uploading, a quick google search found http://www.tizag.com/phpT/fileupload.php
initially create the URLs as according to year using the date function $url = date("Y\m\d"); PHP: there after each time u re uploading the file check the existence of directory.. $date = date(Y\m\d) http_build_query(www.site.com\$data) PHP: by getting the date in a string fix the url to upload.... then check for the existence of the URL function is_valid_url ( $url ) { $url = parse_url($url); if ( ! $url) { // create the directory taking date string } else // u can upload the file } PHP: