Viewing movie through PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Resco
Forum Newbie
Posts: 3
Joined: Mon Mar 24, 2008 6:41 am

Viewing movie through PHP

Post by Resco »

Hello,

I got a server with some .mp4 movie files. The urls are like: http://movies.com/movies/1.mp4
On my second server I got a PHP script for indexing the movies etc, and to view them, however, I would like to hide the real url of the movies on server 1. I would like my PHP script to link to a script like http://secondserver.com/movies.php?movie=1 and it would then begin the play the movie http://movies.com/movies/1.mp4 (but without displaying this url offcourse). Can this be done without using the bandwidth of server 2 (so it would just "buffer" the movies from server 1).

Thanks in advance,

Resco
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Viewing movie through PHP

Post by Christopher »

You could put the movie in a frame or iframe.
(#10850)
Resco
Forum Newbie
Posts: 3
Joined: Mon Mar 24, 2008 6:41 am

Re: Viewing movie through PHP

Post by Resco »

arborint wrote:You could put the movie in a frame or iframe.
But that doesn't hide the URL (it's still viewable in the source code).
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Re: Viewing movie through PHP

Post by toasty2 »

On the first server you could have a script that the movies go through to hide the URL. Just output the correct headers and use readfile().
Post Reply