Thanks for your instructions, Bogu. I have followed your codes given but still not working. 3 files uploaded: "test.php", "return_movie.php" and "wmv.wmv"

http://melody.freeprohost.com/test.php
<PARAM NAME="fileName" VALUE="return_movie.php?filename=wmv.wmv">

return_movie.php:
<html>
<head>
<title></title>
</head>
<body>
<form action="return_movie.php" method="get">
</form>
<?php
echo "real_path_to_the_movie/{$_GET['wmv.wmv']}";
?>
</body>
</html>

    Dont mind what I write u above, that day I dont know what I was thinking ...

      It's OK. Thanks anyway.

      I wonder if anyone could help?

        Does anyone know of a PHP script to embed window media video file?

          I don't understand your problem. What exactly do you want to achieve?

            I hope to use php code to embed a window video file instead of using <embed src="ghislaine.wmv"></embed> as I do not want people to see the source of the video file.

            Any help would be greatly appreciated.

              Php is not good for this u need to use javascript ...

                Thanks but I found this link on another site which uses php code to embed WMV file(and I also noticed a number of TV stations which used php script for their online shows):
                http://www.conversysinternational.com.au/mytv/index.php?channel=test

                <form action =post><input type=hidden value="1"></form>
                <PARAM NAME="fileName" VALUE="channelload.php?channel=test">

                Would be grateful if anyone could help with the code for "channelload.php"

                  Ah, that's not "embedding with PHP". Ok, channeload.php in short:

                  • fetch $_GET['channel']
                  • get filename of the video according to channel
                  • format headers to return appropriate Content-Type
                  • open video file and print the contents back to the browser.

                  HOWEVER, this last item is tricky. You can slurp entire file into memory and pass to browser (fpassthru()), or you can write a loop and send chunks of the file if it is too big, and it probably will be since video files are large (comparing to PHP RAM and possible number of simultaneous connections).

                    bogu wrote:

                    Php is not good for this u need to use javascript ...

                    It would make it easier to use JavaScript because it's not such a complex code. You might even be able to swing it with HTML too.

                      Thanks to void_function and Ascendancy for your kind input.

                      void_function wrote:

                      Ah, that's not "embedding with PHP". Ok, channeload.php in short:

                      • fetch $_GET['channel']
                      • get filename of the video according to channel
                      • format headers to return appropriate Content-Type
                      • open video file and print the contents back to the browser.

                      Tried writing the channeload.php script but got stuck.
                      Appreciate if you could give the sample code if it is not taking you too much time.

                        If you post what you got stuck with we'll be able to work on it with you instead of do it for you

                          Does it need to look like a Windows Media Format? You can easily add any media type with the <EMBED> tag.

                            Write a Reply...