ASP和PHP实现生成网站快捷方式并下载到桌面的方
在网站上设置“加入收藏、设为首页”等按钮是一般网站都会干的事儿,有的网站还有“放到桌面”这样的功能设置。
狼蚁网站SEO优化即生成快捷方式并下载到桌面的php实现代码,摘录修改于网络,仅作参考
php实现代码
<?php
if(isset($_GET[title]) && trim($_GET[title]) !== "") $title = trim($_GET[tilte]);
$content='
[DEFAULT]
BASEURL=https://.jb51./?desk
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InterShortcut]
URL=https://.jb51./?desk
IDList=[{000214A0-0000-0000-C000-000000000046}]
IconFile=https://.jb51./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="狼蚁SEO"
Shortcut = "[DEFAULT]" & vbCrLf
Shortcut = Shortcut & "BASEURL=https://.jb51./?desk" & vbCrLf
Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Shortcut = Shortcut & "Prop3=19,2" & vbCrLf
Shortcut = Shortcut & "[InterShortcut]" & vbCrLf
Shortcut = Shortcut & "URL=https://.jb51./?desk" & vbCrLf
Shortcut = Shortcut & "IDList=[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Shortcut = Shortcut & "IconFile=https://.jb51./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快捷方式的内容强制输出为附件,当访问时即下载到了一个定制的网站快捷方式。这个功能的作用却可能是很大的,你可以设置其默认图标与如我的电脑、网上邻居、文件夹等相同,而且因为它是正常的快捷方式,不会被杀毒软件等查杀,也常被一些黑客行为所使用,以带来巨大的真实访问流量。
编程语言
- 宿迁百度关键词排名指南:实现精准营销的关键
- 四川SEO优化怎么做网络推广
- 立昂技术备案老域名收购:如何为您的业务赋能
- 安徽百度关键词seo贵不贵,一般需要多少钱
- 吉林百度快照排名怎么做电话营销
- 多伦新手做SEO怎么做
- 甘肃优化关键词排名推广怎么做论坛营销
- 沙雅SEO网站推广:提升您的在线可见性
- 四川SEO优化如何提升销售额和销售量
- 聂荣网站排名优化:提升网站可见性的全方位指
- 涞水SEO:提升地方企业在线可见性的策略
- 辽宁百度seo排名怎样做网站排名
- 临湘哪有关键词排名优化:提升网站可见度的关
- 黑龙江百度网站优化有没有优惠
- 凉城优化关键词排名推广:提升您的网络可见性
- 萝北整站优化:提升您网站流量和排名的全面指