Let's consider $real_url = "http://remote-server.com/myfile.mp3"
I want to allow visitors can stream the file without showing the real URL (contained in $real_url). In <embed> tag, I use src = './play.php?id=$id' (so './play.php?id=$id' is a virtual link) and I have file play.php with the content:

<?php
$id = $_GET['id'];
//some stuff here
if (isset($id))
{
header("Location:$real_url");
} else {
header("HTTP/1.1 404 Not Found");
}
?>

The real URL can not be shown when I view Properties in Windows Media Player while playing the music file (I only see http://mydomain.com/path/play.php?id=anything) or even type http://mydomain.com/path/play.php?id=anything in the address bar of browsers. However, the real URL (http://remote-server.com/myfile.mp3) still be shown by software named "URL Helper" (Latest version: 2.6).
I have been told using readfile() or fpassthru() but remember that play.php and myfile.mp3 are on separate servers therefore If I use these functions, my BW will get double!
Who can give me a solution for this problem? What is a better way to hide link than header()?
Thank you in advance!

    Yes, I'm the owner of both hosts! Please help me...!!!

      Okay, on the first site, do the usual header, except redirect to a PHP script:

      header("Location: http://www.remote-server.com/play.php?file=blah.mp3");

      and then use [man]readfile[/man] on the remote server.

        Thanks for your idea! It is currently working now!

          Write a Reply...