PHP Generate Web Desktop Shortcut Code Sharing
- 2021-07-21 08:01:00
- OfStack
PHP to generate desktop shortcuts is so simple, you can change the website you want to generate when you generate it.
dianji. html code:
<a href="a.php?url=www.ofstack.com&name= Script House "> Generate Left Shortcut </a>
shengcheng. php code:
<?php
// Shortcut to the left side of website survival --- Function
$url = $_GET['url'];
$filename = urldecode($_GET['name']);
$filename = iconv('GBk','utf-8',$filename);// Character set conversion (if there is no need to convert, it will not be converted)
if (!$url || !$filename) exit();
$Shortcut = "[InternetShortcut]
URL={$url}
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename={$filename}.url;");
echo $Shortcut;
?>