|
Posted by JDS on 10/27/16 11:22
On Tue, 26 Jul 2005 00:30:44 -0700, fgarciarico wrote:
> I´ve thought something like that but I must show the video files into
> a media player object in my web pages and I think that if the video
> file isn´t on a valid url, I cannot show it. Or?
You can use a PHP file as the video file. Just send the proper header.
For example, I can use a PHP script as a JPEG or GIF image if I send the
proper header:
header("Content-type: image/jpeg");
AND if the content following is an actual JPEG image.
For example, say I have an image, "image.jpg". I can read it into the PHP
script using one of the binary-safe file reading functions in PHP:
(I think this example will work)
getimage.php:
<?
/* ...Include authentication and security stuff here...*/
$file = "image.jpg";
$file_contents = file_get_contents($file);
header("Content-type: image/jpeg");
print $file_contents;
exit;
?>
Now include getimage.php in your HTML page:
<p>
<img src="getimage.php">
</p>
You should be able to do the same with a video file. Using the video
file's MIME type, of course, in the header.
later...
--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
Navigation:
[Reply to this message]
|