I am trying to load a video file in php using by selecting the file with _GET.
Here is the code
<?php
$id = $_GET["id"];
$video = "vid" . $id . ".mp4";
if (isset($_GET["id"]) AND $_GET["id"] == $id) {
header('Content-Type: video/mp4');
print file_get_contents($video);
}
else {
echo "File not found.";
}
?>
This is my web link.
http://www.animesour.com/video.php?id=555 This will get the file vid555.mp4
However, when you visit the link it doesn't load the video or play it.
It will load images fine, but doesn't seem to work when it's video.
Basically I need it so that when I link http://www.animesour.com/video.php?id=555 in an I frame, that it will load the video. Thank you in advance.