Anti-Theft chain | Download the first type:
Finally to download the system to do a security chain measures, in the download of the page head did the following code, the relevant code is as follows:
From_url = Cstr (Request.ServerVariables
Display form:
ID1 NAME | ID2 NAME
1 JULIET | 2 Palyboy
3 BABY | 4 TOM
5 LENA | 6 Jery
>> first previous next last page: 1/4 6 Records/page Total record number: 25
Code:
Dim rs
Dim sql
Msg_per_page = 4 ' defines the number of record bars per
The ASPX vb.net gets the real IP function as follows:
Copy CodeThe code is as follows:
Complete test page:
Copy CodeThe code is as follows:
untitled page
Dim client_ip as String = Get_cli_ip
Function
1, DateTime digital type System.DateTime currenttime=new System.DateTime ();
1.1 to take the current month and the day seconds
Currenttime=system.datetime.now;
1.2 Take as the year before last
int year =currenttime.year;
1.3 Take the
Skills | performance
Tip 19: Use the browser's validation capabilities
Today's browsers provide support for advanced features such as XML, DHTML, Java applets, and remote Data services. Use these features whenever possible. All of these technologies
xml| anti-theft Chain
We can use XMLHTTP to read the file information, and then transfer to the client, so that we can hide the real address of the file. Thus playing a little bit to prevent the hotlinking function.
In this file, we can use many
Network
If Request.ServerVariables ("http_method") = "Get" Then
' If you request a page as a GET, set the page number to 1
Page=1
End If
Set Rec=server. CreateObject ("Adodb.recordset")
Rec. activeconnection= "Dsn=testsys"
Rec. Source= "SELECT *
Function 1, DateTime digital type
System.DateTime currenttime=new System.DateTime ();
1.1 to take the current month and the day seconds
Currenttime=system.datetime.now;
1.2 Take as the year before last
int year =currenttime.year;
1.3 Take the
One, the realization method
A function that writes the log, provides several parameters, the user program calls this function can implement log record. Log to the XML file, the log file is generated by date, a new log file is created every day, the
HTML section
When a user is logged into the security area of your site, you can use the Login_user in the ServerVariables collection to understand the logged in user account, and of course remember to turn off the Allow anonymous login, and now
Statistics | online | The number of online people recently made a small forum with ASP, customers asked to count the number of online, so spent a little time to write an online statistical visit member function. Many documents are also viewed in the
Requirements: The internal Web site a menu allows only the specified domain user access, can not use the login window, similar to the user name password such things.
Solution: The user clicks the menu, obtains the IP, uses the NBTSTAT-A IP to
This program is a bit difficult, because he is sending each picture separately, so it's not as big as a CGI-generated picture. And the pictures can be reused, so the rate is high speed. It just doesn't go without JavaScript.
Program Original code:
asp.net|xml| Data | Database Drafting language: Popular forum (we focus on asp,asp. NET forum) Development idea
Veteran can skip this section and attend the next section.
At present, there are countless different versions of online forums, in the
Data | Database ' Call method is:
function Safe (str) ' It is used to determine whether a variable passed over contains special characters and does not return true
Dim s_badstr, N, I
S_badstr = "' &<>?%,;:() ' ~!@#$^*{}[]|\/+-= ' CHR (CHR) (9) CHR (3
I'm using a full angle, and we're changing it to half a corner.Not my originalSome of the other learning tutorials are briefly introduced
Effect
. NET version
String sreferer=request.servervariables["Http_referer"];String Slanguage,sbrowser,ssys;if (
Attacking a SQL injection attack is using a design vulnerability that runs SQL commands on the target server and other forms of attack, and the failure to validate the data entered by the user when dynamically generating SQL commands is the main
function function Chkpost ()
Detects if the user's current server name exists on the source page
The code is as follows: Function Chkpost ()
Dim server_v1,server_v2
Chkpost=false
Server_v1=cstr (Request.ServerVariables
Problem ========== calculate the execution time of the page ===========
Dim startime,endtime
Startime=timer ()
%>
Finally, add the following code at the end of the page code:
Endtime=timer ()
Response.Write "Page Execution Time:" &formatnumber
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.