用asp實現網址的桌面快捷方式下載,就是訪問asp文件的時候,實現下載網址的快捷方式,就像我們手動在桌面創建一樣。
方法:新建一個PHP文檔:名字好記就行如:shortcut.asp
asp文檔中的內容:
<%
id=request("id")
liehuo_net_url=request("liehuo_net_url")
If liehuo_net_url="" Then liehuo_net_url="烈火學院"
Shortcut = "[InternetShortcut] " & vbCrLf
Shortcut = Shortcut & "URL=http://www.veryhuo.com/?desktop" & vbCrLf
Shortcut = Shortcut & "IDList=" & vbCrLf
Shortcut = Shortcut & "IconFile=http://www.veryhuo.com/favicon.ico" & vbCrLf
Shortcut = Shortcut & "IconIndex=1" & 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
%>