Results 1 to 2 of 2

Thread: Video Upload

  1. #1
    Join Date
    Apr 2010

    Unhappy Video Upload

    I've an assignment and I've been asked to build a website that will allow Video uploads, adding its description. I've managed to do the layout of the website its registration and logging. However the part that I'm struggling to figure out at the moment is how to allow administrator to upload photos and for those videos to appear for everyone on the website.

    I've got a browse page where all uploaded videos will appear and I would like the normal user to be able to click onto the video and see it. If someone could point me in the right direction I'd be grateful, thanks a lot.

  2. #2
    Join Date
    Jul 2009
    Falls Church, Va.
    What is the video format?

    As to "how to allow administrator to upload photos and for those videos to appear for everyone on the website" you create an HTML form and allow direct uploading plus any other fields related to the video (title, etc.) to display in your gallery page.

    Notes: Don't forget to use "enctype='multipart/data'" in your form and make sure PHP is configured to allow large uploads, i.e. in php.ini:

    • upload_max_filesize
    • max_input_time
    • memory_limit
    • max_execution_time
    • post_max_size

    Set to sensible values, especially the first and last ones listed.

    Write a PHP script to process the upload server side, using either an XML file or database to store fields associated with the video (ID, title, description, etc.) and use PHP's file upload commands to move the file to a directory with proper permissions which will be your gallery.

    Assuming you don't use Flash video, i.e. the "old school" approach:

    In the gallery (simple implementation) page you'll use a PHP script to create a form, inside the form loop to get the directory listing and load the associated fields, add in a hidden field storing the video ID or any other fields you'll need later to show the video, a "Play" submit button and optional delete submit button if user is admin, end the loop then output. If the user presses a "Play" button the form action loads a PHP script which gets the video and generates the proper HTML to play it so the proper plugin loads in the user's browser.

    If you want a "You Tube" like interface, one approach of many is to convert the video server side to Flash (.flv) format or use a cheap video gallery script like this one or use Google to search for "PHP video gallery" scripts. The commercial software is worth checking out, not to purchase, but to give you ideas as to how to approach the design aspects and user interface.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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