ASP也写邮箱注册机-sohu邮箱批量注册器-ASP高级编程交流

使用ASP编写了一个少见的web版邮箱注册机,特别是利用了Ev_HttpRequest.asp类进行HTTP请求,实现了在同一会话中获取验证码和提交注册的功能。用户只需携带手机随时可以进行邮箱注册,程序源码及下载链接已提供。
摘要由CSDN通过智能技术生成

 

邮箱注册机这些东西很多,一般都是写成桌面应用程序的,很少有人写成web程序吧,至少我没见到过。

今天我就来写一个web版的示例,而且用这个貌似有点过时了的asp来写。web程序有个好处,就是外出时,

带个手机能上网就行了,随时随地的方便呀!!

 

下面看几张效果图:

 

 

 

程序源码如下:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>sohu邮箱注册机 - ASP高级编程 - [By EnVon]</title>
<%
response.expires= -1
response.addheader "pragma","no-cache"
response.AddHeader "cache-control","no-store"
%>
<!-- #include file="inc/Ev_HttpRequest.asp" -->
</head>
<body>
<%
'|---------------------------------------------------------------------------
'|
'|  ASP写邮箱注册机,SOHU邮箱注册机,[By EnVon,QQ:407542585] [2012愚人节]
'|
'|  注意:sohu注册是有限制的,注册几个之后就不能注册了,
'|        这样也好,不让一些人拿去刷账号;本源码供学习交流吧,貌似现在很少人用asp了!
'|
'|---------------------------------------------------------------------------
'|
Dim doAction,http

Set http=New Ev_HttpRequest

doAction=Request("doAction")

Select Case Lcase(doAction)
Case "getcode"
	Call GetVerCode()
Case "reg"
	Call RegAccount()
Case Else
	Call ShowRegForm()
End Select

Private Function RegAccount()
	Dim pUrl,pData,pRef,pCok,Data,uName,uPass,uCode
	uCode=Request("verCode")
	If Len(uCode)>0 Then
		'生成注册信息
		uName=Lcase(Ev_RndString(6))&Ev_RndNumber(5)
		uPass=Ev_RndString(8)
		pUrl="http://passport.sohu.com/web/Passportregister.action"
		pData="shortname="&uName&"&domainName=sohu.com&user.password="&uPass&"&password2="&uPass&"&validate="&uCode
		pData=pData&"&uuidCode=&app_para=appid%3D1000&ot_registerid=®isterid=&appid=1000&autologin=1"
		pData=pData&"&ru=http%3A%2F%2Fmail.sohu.com%2Freg%2Fsignup_success.jsp®isterType=Passport&showAllType=0"
		pRef="http://passport.sohu.com/web/dispatchAction.action?appid=1000&ru=http://mail.sohu.com/reg/signup_success.jsp"
		pCok="JSESSIONID="&Session("sohu_JSESSIONID")
		'提交注册表单
		Data=http.PostData(pUrl, pData, pRef, pCok, "gb2312", "", 0)
		If Instr(Data,"恭喜您,已经成功注册") Then
			'注册成功
			Session("sohu_succ_total")=1+Session("sohu_succ_total")
			Call Ev_SaveToFile(Server.MapPath("sohu.txt"), "成功"&chr(9)&uName&chr(9)&uPass&vbCrlf,8)
		Else
			'注册失败
			Session("sohu_fail_total")=1+Session("sohu_fail_total")
			Call Ev_SaveToFile(Server.MapPath("sohu.txt"), "失败"&chr(9)&uName&chr(9)&uPass&vbCrlf,8)
		End If
		Session("sohu_nearly_account")=uName & " - " & uPass
	End If
	'清除http对象
	Call http.ClearHttpObject
	Response.Redirect "?doAction=show"
End Function

Private Sub GetVerCode()
	Dim gUrl,Header,Data,JSESSIONID
	Call http.ClearHttpObject
	Set http=New Ev_HttpRequest
	'取得会话JSESSIONID
	gUrl="http://passport.sohu.com/web/dispatchAction.action?appid=1000&ru=http://mail.sohu.com/reg/signup_success.jsp"
	Data=http.GetData(gUrl, "", "", "gb2312", Header, 0)
	JSESSIONID=EV_Mid(Header, "Set-Cookie: JSESSIONID=", ";", 1, 0)
	Session("sohu_JSESSIONID")=JSESSIONID
	'取验证码
	gUrl="http://passport.sohu.com/servlet/Captcha?time=0.76085387"&Ev_RndNumber(8)
	Call http.GetVerifyImage(gUrl, "", "", header, 0)
End Sub

Private Sub ShowRegForm()
%>
	搜狐邮箱注册机ASP版,随时随地,手机上网也可以注册邮箱啦!<br />
	注册结果保存在当前目录sohu.txt文件。<br />
	<form action="" method="get">
		<img src="?doAction=getCode" style="width:180px;height:80px;border:1px solid #000000;" />
		<br /><br />
		注册成功:<%=NUM(Session("sohu_succ_total"))%>
		<br />
		注册失败:<%=NUM(Session("sohu_fail_total"))%>
		<br />
		最新账号:<%=Session("sohu_nearly_account")%>
		<br /><br />
		请输入验证码:<input type="text" name="verCode" />
		<input type="submit" value="注册" />
		<input type="hidden" name="doAction" value="reg" />
	</form>
<%
End Sub

Public Function NUM(s)
	If Len(""&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值