In web development, I often encounter multiple keyword pairs of a single field query, I usually through a dynamic array to achieve. Of course, a number of keywords are generally used in space or, separated, I this several assumptions with a number
To determine whether access from the search engine functions, interested can try!
Function Check (user_agent)Allow_agent=split ("Baiduspider,scooter,ia_archiver,googlebot,fast-webcrawler,msnbot,slurp", ",")Check_agent=falseFor Agenti=lbound
When we manage Web site files, we can put the same file name extension under the same directory, a more special names, such as the PDF file directory for the_pdf_file_s, save the following code as down.asp, his online path is
Prevent users from frequently refreshing the page, can play a little role.
Method 1,session Technology:Program Code Dim Splitreflashpage
Dim Doreflashpage
Dim shuaxin_time
Doreflashpage=true
shuaxin_time=10
Reflashtime=now ()
if (Not IsNull
The following is an introduction to using a database to implement simple counters
The following is an introduction to using a database to implement simple counters' Save As Count.asp ' belowSet conn=server.createobject ("ADODB. Connection ")Conn.
Maybe read the title will be a bit fog, it doesn't matter, look at the following function to understand, the process is to 123 such a turn into 123.
Turn a string of numbers into a corresponding Chinese characterfunction Convertnumtostr (pnum)Dim
By randomly generating a password and then emailing the password to a registered user, you can confirm that the user's email is correctly filled in. Automatically generated passwords tend to be more secure, and you can filter out users who are not
Converts an IP address to a long integer
Function Clngip (ByVal asnewip)Dim LnresultsDim LnindexDim lniparyLnipary = Split (Asnewip, ".", 4)For lnindex = 0 to 3If not Lnindex = 3 ThenLnipary (Lnindex) = Lnipary (lnindex) * (256 ^ (3-lnindex))End
In order for the ASP to minimize server-side workloads, you should use JavaScript more, and submit all submitted fields to the server using JavaScript or VBScript, so that the server does not have to be tested, and someone may modify the script to
How to better achieve the prevention of hacker attacks, I mention personal views! First, the free program does not really have to be free of charge, since you can share the original code, then the attacker can analyze the code. If you pay attention
To prevent users from directly copying this address can be downloaded, but must be the previous page to jump over the file (such as: WWW.A.CN/DOWN.ASP?ID=XX), can be. For example, users must log in to download.
Call DownloadFile ("1.gif")
Onlinetimeout=10 ' defines the time interval for online activity timeFunction Userip ()Getclientip = Request.ServerVariables ("http_x_forwarded_for") ' "," "'", "'", "" "", "" "," "" to obtain the user's virtual IP addressIf Getclientip = "" or
This is correct if you return the input ID, or you will be prompted for an error
Function Checkcardid (E)Arrverifycode = Split ("1,0,x,9,8,7,6,5,4,3,2", ",")Wi = Split ("7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2", ",")Checker = Split ("1,9,8,7,6,5,4,3,2,1,
Implementation of a number of methods, this article mainly introduces the use of database to achieve a simple counter!
' Save As Count.asp ' below
Set conn=server.createobject ("ADODB. Connection ")Conn. Open "Driver={microsoft Access driver (*.mdb)
Use the ASP to minimize server-side workloads, so you should use JavaScript more, and submit all submitted fields to the server using JavaScript or VBScript, so that the server does not have to be tested again. And at the time of submission, someone
IIS default error page is very unfriendly, many people see the default error page will say: The site can not open! Lost this part of the flow in vain. And if the error page directly to the home page and search engine is very unfriendly, not good
When we use the FSO to generate static pages, we usually want the generated location to be neat and clear. For example, by year and month, then you will need to get a shape such as "2009/6/" or more levels of folders, so I wrote a function to create
We often encounter multiple query problems, and long SQL statements are often confused. In particular, when the client part of the query conditions, such as the ordinary method will be even more difficult. The following ingeniously uses the identity
Upload
A simple ASP file upload source code example, streamlined and practical.
Here's the upload.asp code:If Request.Form ("File1") <> "" ThenDim allowext_ ' Allow upload type (whitelist)Dim Noallowext_ ' does not allow upload type
Coding | function |gb2312|utf-8
Today, we are doing a mobile phone messaging interface to clients, because the interface of the SMS service provider only supports the Chinese UTF-8 encoding way, and the customer's website is GB2312 code, the page
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