ASP Web page Mailbox Access _ Application Tips

Source: Internet
Author: User
Tags generator reserved
A few days ago, a friend in the group asked how to implement the Mailbox Access feature on the Web page, which is now being downloaded from the Web site. This is HTML code. Do you see this feature on some pages when you visit a Web site---you can access the site and see if there are any new messages in your free mailbox. Does this feature make you feel very exciting, very mysterious? Below, I use ASP to give an example to let you know how to achieve this function.

First you can go to some sites that provide free mail services, apply for an account and log in. When you open the mailbox, notice the contents of the Address bar. Now take 371 as an example and you'll find that the content is usually: Http://www.371.net/prog/login?user=fighter&pass=mypassword.

Where "fighter" is Your account, "MyPassword" is your password. Then we can get 3 messages from here. 1th, we got the URL and file name of the processing file: "http://www.371. Net/prog/login"; 2nd is the variable name that records your account: User; 3rd is the name of the variable that records your password: pass. Once we know this information, we have the handwritten HTML file and ASP file.

'/*html source file contents are as follows: * *
Copy Code code as follows:

<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD>
<title>city Club Home </title>
<style type= "Text/css" >
<!--
td {FONT-SIZE:9PT}
Body {font-size:9pt}
Select {FONT-SIZE:9PT}
A {text-decoration:none; color: #003366; font-size:9pt}
a:hover {text-decoration:underline; color: #FF0000; font-size:9pt}
-->
</style>
<script language= "JavaScript" >
function Check (TT) {
if (window.document.form1.selectmail.selectedindex==0) {
Alert ("Please select your mailbox server!") ")
Window.document.form1.selectmail.focus ()
return False
}
if (tt.account.value== "") {
Alert ("Account cannot be empty!") Please fill in. ")
Tt.account.focus ()
return False
}
if (tt.account.value.length<3) {
Alert ("Account length cannot be less than 3 digits!") Please fill in. ")
Tt.account.focus ()
return False
}
if (tt.password.value== "") {
Alert ("Password cannot be blank!") Please fill in. ")
Tt.password.focus ()
return False
}
if (tt.password.value.length<3) {
Alert ("Password length cannot be less than 3 bits!") Please fill in. ")
Tt.password.focus ()
return False
}
Else
return True
}
</script>
<body topmargin=12>
<table border=0 bgcolor=d3d3d3>
<td>
<form action= "postoffice.asp" Method=post onsubmit= "return check (this)" Name=form1
target= "_blank" > <!--where target= "_blank" is used to pop up a new window to view your mailbox-->
<select style= "Font-size:9pt;background-color:add8e6" name= "Selectmail" >
<option name= "Mailsite" value= "City club convenience Post Office" selected>city Club convenient Post office </option>
<option name= ' mailsite ' value= ' 990.net/prog/login?; User;pass; ' >990</option>
<option name= ' mailsite ' value= ' Www.371.net/prog/login?; User;pass; ' >371</option>
<option name= ' mailsite ' value= ' Www.188.net/prog/login?; User;pass; ' >188</option>
<option name= ' mailsite ' value= ' Web.163.net/cgi/login?; User;pass; ' >163</option>
<option name= ' mailsite ' value= ' Freemail.263.net/cgi/login?; User;pass; ' >263</option>
<option name= ' mailsite ' value= ' mail.777.net.cn/v2.0/html/mailbox.php3?; User;pass; ' >777</option>
<option name= ' mailsite ' value= ' Www.126.com/cgi/login?; Email;password; ' >126</option>
<option name= ' mailsite ' value= ' Www.2911.net/cgi-bin/login?; Username;password; ' >2911</option>
<option name= ' mailsite ' value= ' Hotmail.yn.cninfo.net/prog/login?; User;pass; ' > Yunnan 169</option>
<option name= ' mailsite ' value= ' Freemail.china.com/prog/login?; User;pass; ' >china</option>
<option name= ' mailsite ' value= ' Freemail.hongkong.com/prog/login?; User;pass; ' > Hong Kong free email </option>
<option name= ' mailsite ' value= ' Freemail.netease.com/prog/login?; User;pass; ' >Netease</option>
<option name= ' mailsite ' value= ' Lc3.law5.hotmail.com/cgi-bin/dologin?; login;passwd; ' >hotmail</option>
<option name= ' mailsite ' value= ' Www.netaddress.com/tpl/Door/login?; userid;passwd; ' >use.net</option>
<option name= ' mailsite ' value= ' Www.88998.com/cgi-win/login?; Username;password; ' >88998.com</option>
<option name= ' mailsite ' value= ' www.mail.com/mailcom/login.jhtml?; MN;PW; ' > @mail .com</option>
</select><br>
Account Number: <input type=text name=account size=12 style= "font-size:9pt" ><br>
Password: <input type=password name=password size=12 style= "font-size:9pt" ><br>
&LT;/TD&GT;&LT;TR&GT;&LT;TD align=center><input type=submit value= "receiving" style= "font-size:9pt" >
<input type=reset value= "refill" style= "font-size:9pt" >
</td>
</form>
</td>
</table>
</BODY>
</HTML>

'/*html source file content End */
'/*postoffice.asp source file contents are as follows: * *
Copy Code code as follows:

<%@ Language=vbscript%>
<%
Response.Buffer = True
'----------------------------------------------------
' Author:Peter.yu
' Created DATE:2000/3/13
' File Name:PostOffice.asp
' All Rights Reserved. Ownership belongs to City Club
'----------------------------------------------------
%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD>
<title>city Club Convenience Post Office (all Rights reserved owned by City club) </title>
<BODY>
<%
Dim str (3)
STR1 =trim (Request.Form ("Selectmail")) '/* access to the mail server and user account and password information * *
For i = 1 to 3 '/* Splits the information obtained above and assigns it to the array variable.
p = InStr (1,str1, ";")
STR (i-1) = Mid (Str1,1,p-1)
STR1 = Mid (str1,p+1)
Next
If InStr (1,str (0), "http://") =0 Then
Websiteurl = "http://" & Str (0)
Else
Websiteurl = str (0) ' * * Mail server address and specified file name for processing * *
End If
Usernam = str (1) '/* Account variable name * *
Password = str (2) '/* Password change name * *
'/* Merge characters, get such as "Http://www.371.net/prog/login?user=fighter&pass=mypassword characters" * *
Mailurl = Websiteurl & Usernam & "=" & Trim (Request.Form ("account"))
Mailurl = mailurl & Chr (PDF) & password & "=" & Trim (Request.Form ("password"))
Response.Redirect Mailurl ' * Open the mailbox * *
%>
</BODY>
</HTML>

'/*postoffice.asp source file content End */

It's not that hard. In fact, this is not difficult, the key is that you can observe more, find out the rules. So we can use these rules to do a lot of interesting things.

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.