synstealth Posted March 27, 2008 Share Posted March 27, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.