博主呓语:

保存到桌面的ASP/PHP代码--很常用····

Posted by 破冰 on 2012-2-24 23:58 Friday

PHP版

<?php
$Shortcut = "[DEFAULT]
BASEURL=http://www.xxxxxx.com/
[InternetShortcut]
URL=http://www.xxxx.com/
Modified=B07A55D9386FCA01CA
IconFile=http://www.xxxx.com/favicon.ico
IconIndex=1
";


Header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=XXX.url;");
echo $Shortcut;

?>

ASP版

<%
id=request("id")
liehuo_net_url=request("liehuo_net_url")
If liehuo_net_url="" Then liehuo_net_url="XXXXXXXXXXXXXX"
Shortcut = "[InternetShortcut] " & vbCrLf
Shortcut = Shortcut & "URL=http://www.xxxxx.com/?desktop" & vbCrLf
Shortcut = Shortcut & "IDList=" & vbCrLf
Shortcut = Shortcut & "IconFile=http://www.xxxxx.com/favicon.ico" & vbCrLf
Shortcut = Shortcut & "[{000214A0-0000-0000-C000-000000000046}] " & vbCrLf
Shortcut = Shortcut & "Prop3=19,2 " & vbCrLf
Shortcut = Shortcut & " " & vbCrLf
Response.AddHeader "Content-Disposition", "attachment;filename="&liehuo_net_url&".url;"
Response.ContentType = "application/octet-stream"
Response.Write Shortcut
%>

将URL换成你的网站保存成xxxx.php/ASP即可。

 

 

 

发表评论: