Use php to download the solution to generate a link shortcut

  • 2020-06-01 08:55:28
  • OfStack


<?php  
$Shortcut = "[InternetShortcut]  
URL=http://www.your_url.com/  
IconFile=http://www.your_icon.com/  
IconIndex=1  
IDList=  
[{000214A0-0000-0000-C000-000000000046}]  
Prop3=19,2  
";  
header("Content-type: application/octet-stream");  
header("Content-Disposition: attachment; filename= Link to the text .url;");  
echo $Shortcut;  
?>

However, the IconFile icon does not take effect; In addition, this can support Chinese, if not, you can add 1 line of code:

header('Content-Type: text/html; charset=utf-8');  

Place the php file on the server apache and access the shortcut to generate a link.

Related articles: