12-24-2010, 03:16 AM
I'm not sure if this is the right place to ask this, but are there any ways of possibly creating pages/adding entries to a database by the content in a directory?
For example, I want try uploading videos through ftp to a directory on my site. My video files are .flv and have a .xml associated with it. After the video is uploaded, I need to add an entry to the database about the file. But are there any ways of reading the directory, so that when a file is added to that folder the file name is added into a table in database?
Thanks for the guidance
12-24-2010, 03:58 AM
Wouldn't having a webpage uploader form be a better way as this way you can use PHP to do both the uploading of the flv and xml files and also add the DB entry at the same time.
12-24-2010, 05:23 AM
I can do that for small files, but I'm not able to upload large files because my host has a limit on them.
12-24-2010, 05:30 AM
Oh well here's an idea if your host allows the file type 'ini' you can make a file named 'php.ini' and change the upload limit. not everyone may know that but some hosts haven't blocked the ability to do this lol.
12-24-2010, 05:43 AM
I tried that and even asked them to change it but they wouldn't. I also have to stay on the host since I'm given it for free lol
12-24-2010, 06:06 AM
Take a look at (0 0 0 web host . com) no spaces or 0000free.com as these have good free hosting and I would say both are reliable. 99.9% uptime and also show their server stats, the admin of 0000free.com is also very helpful and flexible with how he runs the host making it best for each user.
12-24-2010, 08:09 AM
I can consider those options but I think it would be better if I can find a way to upload files from ftp and have the file names added to a database. I'd at least learn some new things from the attempt.
12-24-2010, 02:51 PM
This would need a server cron job to make this work. A cronjob is a system build in a language like python or something that doesn't need a user to be on a webpage to run it and have it check the dir for new files only make it search for the XML file so it can obtain the info to add to the db.
12-25-2010, 07:18 AM
I think I'll leave this for now until I can learn some more coding lol
Thanks for the help!