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.
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:
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)