Use PHP to implement desktop shortcut download of URL_PHP tutorial

WBOY
Release: 2016-07-21 14:54:37
Original
1049 people have browsed it

Use PHP to implement the desktop shortcut download of the URL, which is to implement the shortcut to download the URL when accessing the PHP file, just like we create it manually on the desktop.

Method: Create a new PHP document: the name is easy to remember, such as: shortcut.php

Contents in the PHP document:

/* Helper's Home http://www.bkjia.com */
$Shortcut = "[InternetShortcut]
URL=http://www.bkjia.com/
IDList=
IconFile=http:// www.bkjia.com/favicon.ico
IconIndex=1
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
"; //Pay attention to modifying the above URL and icon link
Header("Content-type: application/octet-stream"); ​​
header("Content-Disposition: attachment; filename=Fire Academy.url;");
echo $Shortcut ;
?>

Demo: http://www.bkjia.com/plus/shortcut.php

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364550.htmlTechArticleUse PHP to implement the desktop shortcut download of the URL, which is to implement the shortcut to download the URL when accessing the PHP file. Just like we created it manually on the desktop. Method: Create a new one...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template