Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts

    Page creation through multimedia files

    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

  • #2
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    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.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #3
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    I can do that for small files, but I'm not able to upload large files because my host has a limit on them.

    Thanks

  • #4
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    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.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #5
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    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

  • #6
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    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.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • Users who have thanked DJCMBear for this post:

    wincode (12-25-2010)

  • #7
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    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.

    Thanks

  • #8
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    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.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #9
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts
    I think I'll leave this for now until I can learn some more coding lol

    Thanks for the help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •