I have some code which currently operates as follows …
[CODE]header(‘content-type: audio/mpeg’);
header(‘cache-control: no-store, must-revalidate’);
header(‘expires: sun, 06 oct 1974 21:00:00 gmt’);
$file_source = $_GET[‘source’];
$file_bandwidth = $_GET[‘bandwidth’];
$file_location = ‘audio/’.$file_source.’_’.$file_bandwidth.’.mp3′;
header(‘content-length: ‘.filesize($file_location));
$file_pointer = fopen($file_location, ‘rb’);
while (!feof($file_pointer)) {
echo(fread($file_pointer, 16384));
}
fclose($file_pointer);
I really, really, really want for this code to only be usable by a specific page.
The page that loads it uses it’s url as a variable which is then passed into flash to be played as an mp3 file.
Is there any way that I can redirect people who try to view this script via the address bar?
Is there any way to say “If the full address of the page that is loading me externally is == something.php … all is well” ???
In all truth, this php script url is being loaded into a flash file. Is there a prospective method there?