Witam, mam pytanie czy jest możliwość pobrania pliku *.swf z innego serwera po przez PHP lub JS ?
To nie działa:
http://us3.php.net/manual/en/function.readfile.php
Pozdrawiam
<?php // kod php ?>
<?php // TRESC SKRTYPTU PHP echo'<form action=file.php method=post> <input type=text name=cos id=cos> <br><input type=submit name=pobierz value=pobierz> </form>'; { $file = $_POST['cos']; //First, see if the file exists //Gather relevent info about file //This will set the Content-Type to the appropriate setting for the file switch( $file_extension ) { case "pdf": $ctype="application/pdf"; break; case "exe": $ctype="application/octet-stream"; break; case "zip": $ctype="application/zip"; break; case "doc": $ctype="application/msword"; break; case "xls": $ctype="application/vnd.ms-excel"; break; case "ppt": $ctype="application/vnd.ms-powerpoint"; break; case "gif": $ctype="image/gif"; break; case "png": $ctype="image/png"; break; case "jpeg": case "jpg": $ctype="image/jpg"; break; case "mp3": $ctype="audio/mpeg"; break; case "wav": $ctype="audio/x-wav"; break; case "mpeg": case "mpg": case "mpe": $ctype="video/mpeg"; break; case "mov": $ctype="video/quicktime"; break; case "avi": $ctype="video/x-msvideo"; break; case "swf": $ctype="application/x-shockwave-flash"; break; //The following are for extensions that shouldn't be downloaded (sensitive stuff, like php files) case "php": case "htm": case "html": default: $ctype="application/force-download"; } exit; } ?>