Setting buttons such as "Add to Favorites, Set as Homepage" on the website is something that ordinary websites do, but some websites also have the function settings such as "Put to the desktop".
The following is the php implementation code that generates a shortcut and downloads to the desktop. Excerpts and modified on the Internet for reference only
PHP implementation code:
<?php
if(isset($_GET[title]) && trim($_GET[title]) !== "") $title = trim($_GET[tilte]);
$content='
[DEFAULT]
BASEURL=https:///?desktop
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=https:///?desktop
IDList=[{000214A0-0000-0000-C000-000000000046}]
IconFile=https:///
IconIndex=1
HotKey=0
Prop3=19,2';
header("Content-type:application/octet-stream");
header("Content-Disposition:attachment; {$title}.url;");
echo $content;
?>
Asp implementation code:
<%
id = int(request("id"))
if id="" then
title = request("title")
if title="" then title="I"
Shortcut = "[DEFAULT]" & vbCrLf
Shortcut = Shortcut & "BASEURL=https:///?desktop" & vbCrLf
Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Shortcut = Shortcut & "Prop3=19,2" & vbCrLf
Shortcut = Shortcut & "[InternetShortcut]" & vbCrLf
Shortcut = Shortcut & "URL=https:///?desktop" & vbCrLf
Shortcut = Shortcut & "IDList=[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Shortcut = Shortcut & "IconFile=https:///" & vbCrLf
Shortcut = Shortcut & "IconIndex=" & id & vbCrLf
Shortcut = Shortcut & "HotKey=0" & vbCrLf
Shortcut = Shortcut & "Prop3=19,2" & vbCrLf
"Content-Dispositon", "attachment;filename=" & title & ".url";
= "application/octet-steam"
Shortcut
%>
The generation principle is very simple. It is to force output the content of the url shortcut as an attachment, and when accessed, a customized website shortcut is downloaded. However, this function may be of great effect. You can set its default icons to the same as my computer, online neighbors, folders, etc., and because it is a normal shortcut and will not be detected by antivirus software, it is often used by some hackers to bring huge real access traffic.