|
挂QQ的网页源代码[ASP/PHP/JS]
8 @4 q4 G( s4 D8 u: y( V5 K+ S8 J$ r5 _% k4 K9 q
& o% R* S% f* `* w+ J7 M) U
* ^2 O4 e# [: ]3 p% D # [" V/ m# X# f7 K0 ~
说明:此代码适合你做网站用,普通朋友可以不用理这个东西!
! o' O. h( q. l! G$ m; T8 y1 z# H4 ~- ~
ASP: 7 ?0 I" E& c! c! ?" p
0 t- j# d0 _& b0 r* Y O" @
* x+ M9 Z5 s9 a) w0 R/ J6 ]
( i* ~$ C( P" Z- c7 D# h: NCODE: [Copy to clipboard]
. l: g6 _: V# z1 ^# z0 }7 S6 v<% 2 D6 X4 R9 y) J7 x) ]
dim objXMLHTTP, qq, pwd % y3 n6 i' O6 }! t+ b
: ^7 D& b& S2 Y/ R8 M- z N! t' e
qq = "10000"
& m, k: ` R1 F" K/ x: l: cpwd = "123456" " k, E, o H- S7 {
: [5 H6 F4 f2 B; M6 p7 v
set objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP.5.0")
0 Z. q* }6 j0 [5 Z, m3 {objXMLHTTP.open "POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false
/ ~( ^* a5 u! v! m! x/ ?9 AobjXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
8 H3 ~% ?' B7 S, H; [& zobjXMLHTTP.setRequestHeader "Connection", "Keep-Alive" " c o3 y% m. N- Y3 z4 I
objXMLHTTP.send("qq="&qq&"&pwd="&pwd&"&FromWhere=register")
9 {) I9 \) K" o4 ^7 N* \4 K; C; S8 G X: M l3 }& w
if InStr(objXMLHTTP.responseText, "验证失败") then : o% ^) L1 \: V @6 I; a5 j- p
response.write "登录失败" , j. d/ F& O$ y7 z0 f
else
4 ?( Z9 I$ W+ j4 {: y0 [response.write "登录成功"
- I k) x4 V( r$ c9 X/ o3 f1 q3 ]8 Send if
7 R* t! H. `& w( ]# D& K/ B: O- S7 w: ~7 W
set objXMLHTTP = nothing
. Z- ~4 a. N' }9 ?0 n# E%> 3 q6 d0 T+ M/ n9 u1 z4 O
8 U+ R4 q# r$ R) [: k0 V$ w
3 E+ s, g) T$ l8 p9 O- b
# I" l% N* x' jPHP: " ^% O) t+ T5 W' ~' j; A. D4 u
4 }7 G0 U; U. c( W- J8 V. \9 Q) j' W7 t/ k, w" O
# l5 T1 i5 e/ C& M8 @CODE: [Copy to clipboard]
1 {" A# \! j- u- D% m7 U<php % r+ D t- r3 \9 b; n4 z; e) |$ ?( F* h
$qq = "100000"; //qq号码
0 R" C* @. s5 j! l1 z' A5 L5 k6 [$pwd = "123456"; //密码
' R& w+ Z5 X3 ?- G, d% y
% W+ u4 h7 j' L, Q8 F2 s M! R$ch = curl_init();
7 B7 V/ _( _/ `7 \: I
, ^" X5 F7 G! ncurl_setopt($ch, CURLOPT_URL, "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp");
4 Z" g' ]1 G; q! N. x; l/ qcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //这行是设定curl是否跟随header发送的location, 重要 8 K6 `2 x& N/ q8 t/ W- B
curl_setopt($ch, CURLOPT_POST, 1); * h: g. k4 Z2 m
//curl_setopt($ch, "Connection", "Keep-Alive");
6 B# n2 X; C* N& a9 w0 B3 {curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
' S! k# i+ f7 z2 ~/ i- Y0 [; W6 Pcurl_setopt($ch, CURLOPT_POSTFIELDS, "qq=".$qq."&pwd=".$pwd."&FromWhere=register"); 8 ^. H/ D, {9 T* A
8 j& D/ N4 k: c% s% A% M$return = curl_exec($ch);
+ l' F% u% D, u$ v. Y! O( \+ F+ T# _: H3 I9 i2 l* D, c8 [; f6 G" z
curl_close($ch);
/ q4 ~" V* E) ]
2 s" K8 y9 g/ p8 q0 z8 ]( becho strstr($return, "postfield") ? "登录失败" : "登录成功";
* w* H3 _8 ] K: N# S?>
8 Z0 ^. y: c% k6 b
0 A! `) Z/ ^6 E/ |: K; @4 P- ^: I2 s% J% B, D
$ x1 ^0 {) s# R, ^ a" A) {js:
" i* d! V1 Z, ~5 L) ^7 ?9 `) ^7 t+ m n- u1 Z# n/ g: `
6 f: G9 ^# r: {4 M; r! }
1 J+ G! B+ Z% d: o& c% p1 Z5 Y
CODE: [Copy to clipboard]
& @) A$ x1 Q- L/ O4 z2 k<script type="text/javascript">
/ F4 G3 e7 W, Y' Svar qq = "100000"; //qq号码 % W2 L8 D( z% j
var pwd = "123456"; //密码 2 T$ [$ G, Y+ d
7 c* e$ h# U/ Y4 o* C7 K9 w3 B
if (window.XMLHttpRequest) { . ~. i. D- y3 a( _7 C. G
var x = new XMLHttpRequest(); % N& u6 U: H! s; Z
} else {
, z7 T2 r; ]6 K$ ], mvar MSXML = new Array('MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP');
, k- U1 F' _0 X. J, O" T' r2 Z7 [" Hfor(var n = 0; n < MSXML.length; n ++) {
5 G% M9 Y0 {2 q: N+ Etry {
2 ~& g2 L, ~+ a6 q7 T% [# p% Dvar objXMLHTTP = new ActiveXObject(MSXML[n]); 1 u3 J, C' N8 ~& B, W/ J
break; 9 \9 I3 r0 H. W( M
} catch(e) { 3 A* P5 E8 `, q& D4 r3 ?
} 1 @2 @8 e( E) z$ J( r& [8 K+ ?
}
$ n# [ {4 L: E, c$ y6 n* O$ c} 9 E3 K/ a* C& s. j% m
) |& n+ }' y. A2 }7 p g3 b# yobjXMLHTTP.open("POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false); ; }. R3 N3 \6 x, q: j+ L
objXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); * @( P, s( Z/ b1 Y b# H
objXMLHTTP.setRequestHeader("Connection", "Keep-Alive"); - q# K: U( t- u* `! n6 B' @+ g
objXMLHTTP.send("qq=" + qq + "&pwd=" + pwd + "&FromWhere=register"); ) a7 D Y7 |# J3 s. S2 u
1 ~4 j7 d. ?. C" k+ _if (objXMLHTTP.responseText.indexOf("验证失败") > 0) {
[! p+ Z- W: z' ?& t* m/ Walert("登录失败"); % u; h; t, t% n
} else {
1 q% p& f: i8 s, d2 S, Calert("等录成功"); # v9 g' r* k, ~: S H" X$ k
}
& D' ~: D4 i& ]9 {</script>& B1 X& e: _2 J6 v5 t: b J
|
|