Beginners PHP 1:PHP GET
Alex wrote:ThanksLivengood wrote:now lets say you have a video player, but you want to use this to videos.? how would you do this, i know some php, but i am lost on trying to do this...Well, you could get the video id and have in your root web directory a folder named "videos" so when a user uploads a video, it uploads it to that folder by the name of "1.avi","2.avi" and so on. Now, to use $_GET[] for that, it'd be something along the lines of...Code: Select allBasically, we get the id of the video from the URL (http://www.yourwebsite.com/playvideo.php?id=1) and it would embed the video "http://www.yourwebsite.com/videos/1.avi" and tell it not to start on page load.<?php //playvideo.php (Or whatever you want to call it) $videoid = $_GET['id']; ?> <html> <head> <TITLE> Show Video</TITLE> </head> <body> <embed src="<?php echo 'http://www.yourwebsite.com/videos/'.$videoid.'.avi'; ?>" autostart="false" /> </body> </html>

Know lets put this to perspective on Flv, and swf video player, how about that one? lol cause thats what i am working with
Livengood wrote:You would just change the <embed src= part to the HTML code for embedding those types of files.Alex wrote:ThanksLivengood wrote:now lets say you have a video player, but you want to use this to videos.? how would you do this, i know some php, but i am lost on trying to do this...Well, you could get the video id and have in your root web directory a folder named "videos" so when a user uploads a video, it uploads it to that folder by the name of "1.avi","2.avi" and so on. Now, to use $_GET[] for that, it'd be something along the lines of...Code: Select allBasically, we get the id of the video from the URL (http://www.yourwebsite.com/playvideo.php?id=1) and it would embed the video "http://www.yourwebsite.com/videos/1.avi" and tell it not to start on page load.<?php //playvideo.php (Or whatever you want to call it) $videoid = $_GET['id']; ?> <html> <head> <TITLE> Show Video</TITLE> </head> <body> <embed src="<?php echo 'http://www.yourwebsite.com/videos/'.$videoid.'.avi'; ?>" autostart="false" /> </body> </html>
, i understand that part lol
Know lets put this to perspective on Flv, and swf video player, how about that one? lol cause thats what i am working with
<?php
$wants_to_make_guide_today = true;
if($wants_to_make_guide_today == true){
make_guide();
}else{
sleep();
}
?>
$wants_to_make_guide_today = true;
if($wants_to_make_guide_today == true){
make_guide();
}else{
sleep();
}
?>
hi it works perfectly but the video player is waaaaay to small
any ideas?
any ideas?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

zachman61 wrote:hi it works perfectly but the video player is waaaaay to smallUse width and height parameters.
any ideas?
640x385 is youtube width/height if that helps.
Code: Select all
<embed src="<?php echo 'videos/'.$videoid.'.wmv'; ?>" autostart="false" width="640" height="385" />
<?php
$wants_to_make_guide_today = true;
if($wants_to_make_guide_today == true){
make_guide();
}else{
sleep();
}
?>
$wants_to_make_guide_today = true;
if($wants_to_make_guide_today == true){
make_guide();
}else{
sleep();
}
?>
Your a Genius im nominating u for Moty
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

Copyright Information
Copyright © Codenstuff.com 2020 - 2023