PHP creates the instance code for the desktop shortcut

  • 2021-01-02 21:47:44
  • OfStack


$shortCut = "[InternetShortcut]
URL=https://www.ofstack.com
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
";
Header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=JustFlyHigh.url;");
echo $shortCut;  

First, make sure your site root has the favicon.ico file.
Modify the address in the code (URL) and the saved file name (filename).

Note: Do not convert the saved code to UTF-8, because of the differences between various browsers, some will cause the file name confusion when saving.
When you visit this page, you are prompted to download the.url file, which is saved locally as a shortcut.


Related articles: