Code _php tips for creating Web desktop shortcuts with PHP or ASP

Source: Internet
Author: User
Create a new PHP document: The name of a good note on the line such as: shortcut.php
What's in the PHP document:
Code
Copy Code code as follows:

<?php
$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= cloud-dwelling community; URL; ");
Echo $Shortcut;
?>

To see the icon, make sure that there are favicon.ico files in the root directory of the Web site
Upload to the site, access to address: such as: http://www.jb51.net/shortcut.php will be prompted to download a cloud-Habitat community. url file, saved locally is a shortcut!
The following is the ASP implementation code:
Copy Code code as follows:

<%
Id=int (Request ("id"))
If id= "" Then id= "1"
Title=request ("title")
If title= "" Then title= "cloud-dwelling community"
Shortcut = "[Internetshortcut]" & vbCrLf
Shortcut = shortcut & "url=http://www.jb51.net/article/" &id& "Htm?desktop" & VbCrLf
Shortcut = shortcut & "idlist=" & VbCrLf
Shortcut = shortcut & "[{000214a0-0000-0000-c000-000000000046}]" & VbCrLf
Shortcut = shortcut & "prop3=19,2" & VbCrLf
Shortcut = shortcut & "" & VbCrLf
Response.AddHeader "Content-disposition", "Attachment;filename=" &title& ". url;"
Response.ContentType = "Application/octet-stream"
Response.Write Shortcut
%>


It is to be noted that because of possible security issues that are locked
Need to do the following, in the "cloud habitat community," "-" "right"-"attribute-" unlock to access, this is like the online download CHM file needs similar operations.

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.