Implemented with ASP for a specific time period or for a specific audience

Source: Internet
Author: User
Tags join servervariables
In some cases, you may want to make your home page or a page open only for a specific period of time, or only to a specific audience, then use the ASP technology can be easily handled. Do not believe??? And listen to my one by one coming.
First, save the page you want to limit as *.asp, and be sure to change all the URLs that join this paging file super join to "http://..../*.asp".
Then, add the following code at the beginning of the file, note that you want to precede the <HTML> tag.
<% @ language=vbscript%>
<%
Response.buffer=true
If time < #8:00:00# and Time > #23:00:00# then%>
sorry! opening hours are from 8:00 to 11:00.
Click <a href= "Http://location" >here</a> to Home page!
<% Response.End
Else
Response.Clear
End If%>
.....
If you only want specific visitors to access, you can change the IF statement to read as follows:
If not request. ServerVariables ("remote_host") = "host name of a particular visitor" then or if not request. ServerVariables ("remote_addr") = "Host IP address of a particular visitor" then last, save and upload (nonsense!) )。 So your home page has an open limit, what??? Your home page Storage server does not support ASP technology, I strongly recommend that you change a support for ASP's Nest.

Related Article

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.