Code for creating web desktop shortcuts using php or asp

Source: Internet
Author: User
Upload the file to the website. The shortcut cut. php prompts you to download a file named Zhangchu website. urll. saving it locally is a shortcut! Create a new PHP document: just remember the name, for example, export cut. php.
Content in the PHP document:
Code

The code is as follows:


$ Shortcut = "[InternetShortcut]
URL = http://www.jb51.net/
IDList =
[{000214A0-0000-0000-C000-000000000046}]
Prop3 = 19,2
";
Header ("Content-type: application/octet-stream ");
Header ("Content-Disposition: attachment; filename = script home. url ;");
Echo $ Shortcut;
?>


To display the icon, make sure that the favicon. ico file is in the root directory of the website.
Upload to the site, access address: such as: http://www.jb51.net/shortcut.php will be prompted to download a home. url file named feet, save locally is a shortcut!
The following is the asp implementation code:

The code is as follows:


<%
Id = int (request ("id "))
If id = "" then id = "1"
Title = request ("title ")
If title = "" Then title = ""
Export cut = "[InternetShortcut]" & vbCrLf
Export cut = Export cut & "URL = http://www.jb51.net/article/" & id & ". htm? Desktop "& vbCrLf
Export cut = Shortcut & "IDList =" & vbCrLf
Export cut = Export cut & "[{000214A0-0000-0000-C000-000000000046}]" & vbCrLf
Export cut = Shortcut & "Prop3 = 19,2" & vbCrLf
Export cut = Shortcut & "& vbCrLf
Response. AddHeader "Content-Disposition", "attachment; filename =" & title & ". url ;"
Response. ContentType = "application/octet-stream"
Response. Write Shortcut
%>



It should be noted that the lock may be caused by security issues.
You need to perform the following operations: Right-click a chm file in ". url" --> "--" to unlock it. this operation is similar to the chm file downloaded from the Internet.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.