Jump to content

how do i pass swf via headers?


synstealth

Recommended Posts

I am having trouble trying to pass the swf movie and images via headers to hide the path from the client when they are    viewing a member's only movies or images.

 

here's my code that im trying to do..

 

<?
      switch($request){

             case 'movie':
                        $file = 'movie.swf';
		$filename = "videos_members/movies/movie.swf";

		header('Content-type: application/x-shockwave-flash');
                        header('Content-length: '.(filesize($file)) );
             break;

             case 'image':
                        $file = 'image.png';
		$filename = "images/image.png";

		header('Content-type: image/png');
		header('Content-length: '.(filesize($file)) );
       break;	
        }

$contents = @ fopen($filename, 'rb');
if ($contents) {
	fpassthru($contents);
	exit;
}



?>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/98084-how-do-i-pass-swf-via-headers/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.