Hi,
I would like to know how to hide a path to a media file which is called via an embed tag:
page.php contains:
<embed src="path/file.mov">

I replaced it with this:
<embed src="retrieve.php">

with retrieve.php containing:
if($PHP_SELF == "page.php" || ereg("page.php",$HTTP_REFERER)):
header("Location: path/file.mov");
endif;

It works on a Mac but not on a PC (if you own a Mac you can try it on uk.djing.com: daft club for mac)

Could you help me ?

    Try directly sending a header with the corresponding mime type and then echoing the contents of the mov file.

      How to echo the content of the mov file ?

        $movie = fread(fopen('movie.mov'),filesize('movie.mov'));

        echo $movie;

          With this:

          <?php header("Content-Type: video/quicktime");
          $movie = fread(fopen('file.mov','r'),filesize('file.mov'));
          echo $movie; ?>

          It doesn't seem to work... I get this:

          H>#ø>7¨>KX>_>r¸>†h>š>­È>Áx>Õ(>èØ>üˆ?8?#è?7˜?KH?ø?r¨?†X?š?­¸?Áh?Õ?èÈ?üx@(@#Ø@7ˆ@K8@è@r˜@†H@™ø@­¨@ÁX@Õ@è¸@ühAA#ÈA7xAK

          ...

            i think you must
            <?php header("Content-Type: video/quicktime\n\n");

              Now it works, even without the "\n\n". Maybe browser cache problem...

              So The answer to this thread is:

              <?php header("Content-Type: video/quicktime");
              $movie = fread(fopen('dir/file.mov','r'),filesize('dir/file.mov'));
              echo $movie; ?>

              Thanks for your help.

                Doesn't seem to work very well tough. Playback stops before the end of the file and sometimes there's a plug-in problem... :-(

                  Are you sure you haven't sent anything, that that's the first line of your script?
                  Cause even a line would automatically send the text/html header by default.
                  If you are positive about that, then sorry, I don't see any way to hide the path.

                    Write a Reply...