• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uload a video file of any format and store it i database


can anyone help for uploading a video file in database and viewing the video file fetching from database in php.

But i need the video file in any format when uploading and convert the video file to a specific format and play.

Thanks in advance

Why would you store a video file in the database? You should only store the link to the video file in the database.

ok, so how can i view the video file fetching from database by a link and show all videos are in a specific format.

You create an video upload area and save the path to your database which you could also store the video information along with it.

Ok, i got it and i wrote the following code in Main page for form submit:

<form method="post" action="test_video_action.php">
YouTube ID: <input type="text" name="YouTubeID" />
<input type="submit" name="submit" value="submit" />

and in action page for only show the video the code is:

//echo $_POST["YouTubeID"];
&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/&lt;?php echo $_POST["YouTubeID"]; ?&gt;"> </param>
&lt;embed src="http://www.youtube.com/v/&lt;?php echo $_POST["YouTubeID"]; ?&gt;" type="application/x-shockwave-flash" width="425" height="350"&gt; &lt;/embed&gt; &lt;/object&gt;
&lt;?php } ?&gt;

Now my question is if the link of an you tube video is "http://www.youtube.com/watch?v=gIbIO4p8ff4&feature=related" then when i passing only the id after "v=" the video shows correctly. But, when i passing the total link in the form it didn't show the video...

can you please give me a solution for both link post, i.e. a user can post only the ID after "v=" or can post the total you tube link and the video play.

The code you are showing is procedural PHP code and none of it is CodeIgniter code.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.