Welcome Guest, Not a member yet? Register   Sign In
Uload a video file of any format and store it i database
#1

[eluser]rash[/eluser]
Hi,

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
#2

[eluser]InsiteFX[/eluser]
Why would you store a video file in the database? You should only store the link to the video file in the database.
#3

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

#4

[eluser]InsiteFX[/eluser]
You create an video upload area and save the path to your database which you could also store the video information along with it.
#5

[eluser]rash[/eluser]
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" />
</form>

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

<?php
$action=$_REQUEST['submit'];
if($action=="submit"){
//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.
#6

[eluser]InsiteFX[/eluser]
The code you are showing is procedural PHP code and none of it is CodeIgniter code.




Theme © iAndrew 2016 - Forum software by © MyBB