|
挂QQ的网页源代码[ASP/PHP/JS]3 L) g; h# K& u, q3 [2 ]
. @ a( k% x( _" m2 m
4 ~( m0 O( s4 H7 T3 D4 [, V# S- ]% F- @
1 |4 w4 m& T* H: H
说明:此代码适合你做网站用,普通朋友可以不用理这个东西!
]" |* f3 n [& n& o- w/ ]& x# M: c$ W' m
ASP:
6 y% D6 g9 ?2 H3 v6 x; |- Q* p) y: ~$ n; X! s
- @; b; e9 S0 Q5 U) Z/ G
* P# k3 j1 I4 n1 K# s* x+ S9 V9 `( LCODE: [Copy to clipboard] % x8 @ h, A2 M! x& j, S- ~; ?3 T
<%
: H: t) f% Y, b% _* }+ ndim objXMLHTTP, qq, pwd / I: k. t4 @+ L/ q$ E' M
2 Y4 |% ~( }% l8 F! P1 I* z
qq = "10000"
# r6 U9 ]% U( W q& r# @pwd = "123456" ( d$ I7 m; M. J F7 X! x- ^
$ s }# ]% I6 C7 L
set objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP.5.0")
5 t3 A. O9 U7 e/ J1 XobjXMLHTTP.open "POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false + k& d. r$ \* z" r( F6 k. I
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" : Y3 Q; G) Q; y. d: _
objXMLHTTP.setRequestHeader "Connection", "Keep-Alive"
" v% d( f# e! h$ w9 Q kobjXMLHTTP.send("qq="&qq&"&pwd="&pwd&"&FromWhere=register")
3 o8 C7 |0 p# s
6 c$ l$ k! t$ I+ N% Kif InStr(objXMLHTTP.responseText, "验证失败") then ) l" m8 }3 L+ m7 j5 l1 Q
response.write "登录失败"
5 {. ?$ b5 W9 }+ f( [else 5 K, Z! q/ x4 c" K, X8 I
response.write "登录成功"
. O( r( L; T1 T+ H4 ^end if
) _, E4 c8 M) O: o1 @1 s' j" E" A' u& [4 A4 @
set objXMLHTTP = nothing
! g0 z8 i. t" p D+ q%> ! T9 N5 }6 E$ v- d
9 y3 K1 X* V2 h: D: h7 i; U4 s8 M
4 [* y8 m( c) E' T
: a" S% Z B5 Z+ F
PHP: 7 e0 m' t% Z5 F4 Z
3 E6 W2 Q$ X$ k8 B+ i4 b4 Y* h# U! w- d' z
7 S# {1 \! a: G9 ~CODE: [Copy to clipboard] ( C# m0 `: s+ ?2 ]$ M
<php , t/ [% h8 {! B8 p9 ~
$qq = "100000"; //qq号码
: Z$ |. d2 c% P! \7 D. E$pwd = "123456"; //密码
3 k3 Q6 h& O. I! e9 W( _' @9 f& q; ?8 R
% R; ^/ ?7 m- [$ v$ch = curl_init(); / y) k8 b2 M) e. F
9 ?) w$ E8 Q+ a, m/ J2 Scurl_setopt($ch, CURLOPT_URL, "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp");
0 o1 }* V$ j W- R0 K e: Pcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //这行是设定curl是否跟随header发送的location, 重要
/ i2 e+ ?& O4 D- f! ~1 G' ocurl_setopt($ch, CURLOPT_POST, 1); % f% y* M% ^( R% K( z
//curl_setopt($ch, "Connection", "Keep-Alive"); , P4 G8 K9 j; J$ T$ A
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
4 Y! }4 f. M) j# [curl_setopt($ch, CURLOPT_POSTFIELDS, "qq=".$qq."&pwd=".$pwd."&FromWhere=register");
% G1 l/ J) a+ B% S+ A
: ^; [8 q7 k7 D- j, ]$ d7 V$return = curl_exec($ch); & l0 |& S( H& A4 C! ?0 V3 m7 B o
8 ~2 x O. b$ a( L9 Hcurl_close($ch);
4 C2 O5 I# f0 l' n: ^1 e$ q# z" @: D7 _0 ?
echo strstr($return, "postfield") ? "登录失败" : "登录成功"; 9 } P% N# V! G" V% E
?>
+ E: l" p' Q) M$ T/ a; K
, X5 i1 R" n/ P. a1 B6 ]9 N
( g" }; o; p% d6 g0 O) W/ ]7 W* U, U3 b
js: % |' n8 _- C# \, s6 z" `
, i& r' [6 E2 i) C
" L. I8 M! [6 z8 O9 g0 q
+ x+ x9 E) m1 u9 KCODE: [Copy to clipboard]
! x. o. E6 P7 K, R# F {<script type="text/javascript">
: m& h9 D0 q$ y# l* lvar qq = "100000"; //qq号码 " v6 ~3 P- ^# @; V1 C6 n
var pwd = "123456"; //密码 * i" h) N' }" {8 C/ @0 I6 M
$ g+ I$ o8 f3 e! M0 S& ~( j. o! E6 Iif (window.XMLHttpRequest) {
7 j! {" G& j. U/ A( Svar x = new XMLHttpRequest(); ( m1 |) V& B5 F2 k1 V
} else {
V% q9 j/ H1 X6 V) ~4 pvar MSXML = new Array('MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'); 0 I/ t1 | z8 b1 E
for(var n = 0; n < MSXML.length; n ++) { + u& M; s9 X& | U5 Y! k3 @' \
try { . u _; R: S1 c+ U
var objXMLHTTP = new ActiveXObject(MSXML[n]);
* }+ Y& c0 }( N3 Rbreak; - O+ n8 q+ ?( o, D
} catch(e) {
. X) v: o5 Y5 L( E A5 v8 w' q}
/ k- W- R( {: ~4 E}
0 J6 Q4 Q$ i1 h$ \9 c4 _+ z}
: i/ b, g4 ?( I9 v/ | {* _+ F( E+ v% m. T
objXMLHTTP.open("POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false);
) g& {* H: I6 J! C+ e/ K- A1 gobjXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
, P; ?' S0 R; D% _6 A6 u# wobjXMLHTTP.setRequestHeader("Connection", "Keep-Alive"); : o, |- {# E$ \( m3 G
objXMLHTTP.send("qq=" + qq + "&pwd=" + pwd + "&FromWhere=register"); 2 n2 H2 C7 J B$ u/ J
8 U$ l4 |6 P2 C! U: E
if (objXMLHTTP.responseText.indexOf("验证失败") > 0) { ! b, _6 ] s( Z5 j" Z: A
alert("登录失败"); 6 ]! G( Q% h4 j: ~" o& v
} else {
5 w C6 K( S0 balert("等录成功"); ; n" b( Y8 W' I
}
2 m9 {7 w& T R% k, F3 Q</script>, s1 T/ ^& f+ N4 E
|
|