Hi there
I have a client that's handed me this project which requires the need to view avi files over the web.
The client will fill in a form consisting of 5 fields. one of those fields is for uploading his .avi files. (place, post code, latitude, longitude, video)
The end user's page will have a different form consisting of 2 fields to narrow down their search: place, post code (its not set in stone that its going to be 2 fields. could be more). once they have filled that form out and hit submit a list should display the videos for that region. the end user then will click the video they want to view.
my question is how can i get the .avi video to play in the browser?
can i use something like this to show any video?
in the header i have this:
<?php
if(!isset($_GET["vid"])) {
die();
}
if(empty($_GET["vid"])) {
die();
}
$video = $_GET["vid"];
$length = filesize($video);
header("Content-Type: $content");
header("Content-Length: $length");
readfile($video);
?>
- <?php
- if(!isset($_GET["vid"])) {
- die();
- }
-
- if(empty($_GET["vid"])) {
- die();
- }
-
- $video = $_GET["vid"];
- $length = filesize($video);
- header("Content-Type: $content");
- header("Content-Length: $length");
- readfile($video);
- ?>
-
in the body i have this:
<html>
<head></head>
<body>
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6.">
<param name="src" value= <?php echo "\"video.php?vid={$_GET["vid"]}\""; ?>>
<param name="autoplay" value="true">
<param name="controller" value="true">
<embed src=<?php echo "\"video.php?vid={$_GET["vid"]}\""; ?>
autoplay="true" controller="true"
pluginspage="">
</embed>
</object>
</body>
</html>
- <html>
- <head></head>
-
- <body>
- <object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6.">
- <param name="src" value= <?php echo "\"video.php?vid={$_GET["vid"]}\""; ?>>
- <param name="autoplay" value="true">
- <param name="controller" value="true">
-
- <embed src=<?php echo "\"video.php?vid={$_GET["vid"]}\""; ?>
- autoplay="true" controller="true"
- pluginspage="">
- </embed>
-
- </object>
- </body>
- </html>
-
will this work for whatever video is chosen?
will i need to specify that it is for .avi?
many thanks on your reply
DB.