Php prohibits the use of download tools to download files
- If (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "MSIE 8.0 "))
- Echo "Internet Explorer 8.0"; // Other execution commands can be written here
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "MSIE 7.0 "))
- Echo & quot; Internet Explorer 7.0 & quot ";
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "MSIE 6.0 "))
- Echo & quot; Internet Explorer 6.0 & quot ";
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "Firefox/3 "))
- Echo "Firefox 3 ";
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "Firefox/2 "))
- Echo "Firefox 2 ";
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "Chrome "))
- Echo "Google Chrome ";
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "Safari "))
- Echo "Safari ";
- Else if (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "Opera "))
- Echo "Opera ";
- Else echo $ _ SERVER ["HTTP_USER_AGENT"];
- ?>
- If (strpos ($ _ SERVER ["HTTP_USER_AGENT"], "MSIE") echo "prohibit Internet Explorer or other download tools to download ";
- Else header ("Content-Disposition: attachment; filename = 'jquery. js'"); // write the file name
- ?>
|
Php