在网站上设置“加入收藏、设为首页”等按钮是一般网站都会干的事儿,但是有的网站还有“放到桌面”这样的功能设置。
下面即生成快捷方式并下载到桌面的php实现代码,摘录修改于网络,仅作参考
php实现代码:
复制代码 代码如下:
<?php
if(isset($_GET[title]) && trim($_GET[title]) !== "") $title = trim($_GET[tilte]);
$content='
[DEFAULT]
BASEURL=https://www.jb51.net/?desktop
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=https://www.jb51.net/?desktop
IDList=[{000214A0-0000-0000-C000-000000000046}]
IconFile=https://www.jb51.net/favicon.ico
IconIndex=1
HotKey=0
Prop3=19,2';
header("Content-type:application/octet-stream");
header("Content-Disposition:attachment; {$title}.url;");
echo $content;
?>
asp实现代码:
复制代码 代码如下:
<%
id = int(request("id"))
if id="" then id="1"
title = request("title")
if title="" then title=""
Shortcut = "[DEFAULT]" & vbCrLf
Shortcut = Shortcut & "BASEURL=https://www.jb51.net/?desktop" & vbCrLf
Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Shortcut = Shortcut & "Prop3=19,2" & vbCrLf
Shortcut = Shortcut & "[InternetShortcut]" & vbCrLf
Shortcut = Shortcut & "URL=https://www.jb51.net/?desktop" & vbCrLf
Shortcut = Shortcut & "IDList=[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Shortcut = Shortcut & "IconFile=https://www.jb51.net/favicon.ico" & vbCrLf
Shortcut = Shortcut & "IconIndex=" & id & vbCrLf
Shortcut = Shortcut & "HotKey=0" & vbCrLf
Shortcut = Shortcut & "Prop3=19,2" & vbCrLf
Response.AddHeader "Content-Dispositon", "attachment;filename=" & title & ".url";
Response.ContetType = "application/octet-steam"
Response.Write Shortcut
%>
其生成原理很简单,即将url快捷方式的内容强制输出为附件,当访问时即下载到了一个定制的网站快捷方式。但是这个功能的作用却可能是很大的,你可以设置其默认图标与如我的电脑、网上邻居、文件夹等相同,而且因为它是正常的快捷方式,不会被杀毒软件等查杀,因此也常被一些黑客行为所使用,以带来巨大的真实访问流量。
ASP,PHP,生成网站快捷方式
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- 群星《十二女声Ⅲ》[WAV/CUE/分轨][626.4MB]
- 陈百强.1993-离不开...纪念歌集2CD【华纳】【WAV+CUE】
- 于台烟.2003-爱自己【乾坤唱片】【WAV+CUE】
- 群星.2024-我们永远是我们电影原声带【乐禾发文化】【FLAC分轨】
- 【中国民乐】张维良《秋江夜泊》2004[FLAC+CUE]
- 明达年度发烧碟MasterSuperiorAudiophile2011[DSF]
- 明达年度发烧碟MasterSuperiorAudiophile2017[DSF]
- 翁立友.2008-恨孤单【大旗】【WAV+CUE】
- 群星.2009-Magic.Cover日粤精华3CD【环球】【WAV+CUE】
- 华少翌.2005-华少翌【中唱艺能】【WAV+CUE】
- 群星《十二女声Ⅱ》[WAV/CUE/分轨][527MB]
- 大自然音乐系列《漫步在山裡》[WAV/CUE/分轨][502.8MB]
- 大自然音乐系列《星光夜语》[WAV/CUE/分轨][453.3MB]
- 史依弘《史依弘交响乐京剧演唱专辑HQ》头版限量编号[WAV+CUE]
- 曼丽2020《女人三十风继续吹》HQCD[WAV+CUE]