To create desktop shortcuts with PHP we need to use Header,internetshortcut and some code that I can't read.
method: Create a new PHP file, and then throw the following code in, save for example shortcut.php, put on the site and directory, the code is as follows:
$shortCut = "[internetshortcut] url=http://www.baidu.com idlist= [{ 000214a0-0000-0000-c000-000000000046}] prop3=19,2 "; Header ("Content-type:application/octet-stream"); Header ("Content-disposition:attachment; Filename=baidu.url; " ); Echo $shortCut
Instance:
Header ("content-type:text/html; Charset=utf-8 "); $url = ' http://php.net/manual/zh/function.get-meta-tags.php '; $metas = Get_meta_tags ($url); $kws _arr = Array_filter (Array_map (' Trim ', explode (', ', $metas [' keywords '])); $filename = Empty ($kws _arr)? ' Collection ': $kws _arr[0]; Print_r ($metas); $shortCut = "[internetshortcut] url={$url} idlist= [{000214a0-0000-0000-c000-000000000046}] prop3=19,2" c7>; Header ("Content-type:application/octet-stream"); Header ("content-disposition:attachment; filename={$filename}.url; "