|
挂QQ的网页源代码[ASP/PHP/JS]
! x2 x/ _! s+ Z- S5 h5 Y
$ n- R, M5 Z6 x# o A
1 D+ F/ @ o, d
. {4 s7 i3 i/ A& L, P
. [" U( \" z# y, }8 L说明:此代码适合你做网站用,普通朋友可以不用理这个东西!
* y( M% E, K" a6 \5 w( Q
" g( w1 Y1 }$ M6 W+ NASP:
/ t% X+ k: `3 V( g$ j, W* _( ]/ J. a m [, O$ r! ^( P: k
& V: V5 ?; k7 p9 V5 F6 r
: w2 R M7 c" {: _ S7 A3 tCODE: [Copy to clipboard]
. H4 R+ K0 ^, C6 |" Y' N: G2 z# ^" W" F b<% 2 u! [8 I; H$ \1 M
dim objXMLHTTP, qq, pwd 1 G% q0 k: z8 R: u7 }; X4 |! c
2 A/ c6 P0 i7 _3 o1 E/ oqq = "10000"
3 G! S: q3 }# K3 Ypwd = "123456" ; T3 N0 l4 f" ]
9 r3 z- [1 F1 k+ z+ Uset objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP.5.0")
. K& [, A: g8 v' K* ]- Z* QobjXMLHTTP.open "POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false / C$ e' x. j0 P l* X! u, z
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" - M. e, g9 P$ U2 z
objXMLHTTP.setRequestHeader "Connection", "Keep-Alive"
5 T+ }" p2 i' T- O0 A0 `objXMLHTTP.send("qq="&qq&"&pwd="&pwd&"&FromWhere=register")
7 B- |3 z# p+ F1 q4 `, Z% h2 @9 P9 Q/ k: O
if InStr(objXMLHTTP.responseText, "验证失败") then 7 z% y2 }: \( C3 ~* A5 \; M
response.write "登录失败"
# k2 w" F! j9 p, h1 L7 \; J* |9 R& Lelse 0 U6 W2 v, u6 c' e5 t- C4 r1 Q
response.write "登录成功" % S( v2 \# Y9 q/ |: h0 e
end if ( F( T) n/ i4 N: b6 O
- A1 [, Z3 X0 y- c; vset objXMLHTTP = nothing " z9 F: }7 }. T
%> 8 U& p$ I) J% H! y' X. m
/ B& v- Q. G/ K' @. _4 s, o
: Z8 Y5 l: W% r* H9 ^, |6 |/ Y1 Q) u# i3 B* c6 o3 c
PHP: % T" |9 c, Q2 M0 u: Z9 i& v
- M, @ g9 G' X" b& m
L3 F4 }* F1 i5 p+ \3 W9 e; z
6 L' d/ I; t2 x5 N# C h- y
CODE: [Copy to clipboard] ! a) |8 U6 ~6 } k- ?: ~
<php ; k1 h" P) M( n- x- P. [) c
$qq = "100000"; //qq号码
2 A& \0 A4 ]" k7 {$pwd = "123456"; //密码 R4 M) A! n! W, P" ~5 t) S
# B% N2 s4 E- C z6 n) \4 l
$ch = curl_init(); ! c, T# F/ Z! U3 I! \& U; m& s7 N
6 K8 N# k% {% } A1 L& o
curl_setopt($ch, CURLOPT_URL, "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp");
. }: u, v: H1 `! Acurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //这行是设定curl是否跟随header发送的location, 重要
& \% q( ?; L6 Q: x) I- ?curl_setopt($ch, CURLOPT_POST, 1);
2 @5 @( ]( a$ T//curl_setopt($ch, "Connection", "Keep-Alive"); 5 L p" P7 u7 I- U/ \
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); 8 ]5 E H& t1 Z% D; g
curl_setopt($ch, CURLOPT_POSTFIELDS, "qq=".$qq."&pwd=".$pwd."&FromWhere=register");
^6 Z' I t% s7 z
, Z' k& u* W# L$return = curl_exec($ch);
7 I' U4 T5 h: g1 m) d% T' s
% S8 e" E! }; C, M; T; ^3 _curl_close($ch);
3 ]0 }$ e+ {# i
. E9 N5 k" ]! L6 r% uecho strstr($return, "postfield") ? "登录失败" : "登录成功"; $ n6 y1 V, o0 K6 D$ e) C1 D
?> 4 ]2 I8 K& ^3 Q& x# D. Q
/ f$ r2 ~* A* b, O
3 l$ W' _7 n& L
$ r4 s% Z, N" `8 T7 j- l. ?% ]$ zjs: ) E' A+ I5 ^5 x' V A9 t. n
* j* g' ]. [. R9 N7 E2 a+ ^1 Y+ R f; A* P2 |2 i
7 z: m4 b+ [% s; nCODE: [Copy to clipboard]
, T8 Y. I4 K/ f! ]0 v P/ G<script type="text/javascript"> + J" B' e+ \( p, f! E/ u- [1 O
var qq = "100000"; //qq号码 % d, p n( U" U$ a4 h' @# @
var pwd = "123456"; //密码
+ @! I& d# t2 ^ q9 h/ A+ \0 q
- r% H# w2 `+ vif (window.XMLHttpRequest) { - ?) K U# b0 h- u, e
var x = new XMLHttpRequest();
5 Y5 g9 M2 \8 U9 G- V' T1 h9 K; p} else {
- h2 T. S: n/ D' Y) [0 b& J) ]7 Cvar MSXML = new Array('MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP');
3 N2 g) K9 N0 ~# H7 t( Ifor(var n = 0; n < MSXML.length; n ++) {
8 ~7 \! `1 P Z! X% c5 ^! Q) ftry { + L" t' C+ K2 u8 M% {
var objXMLHTTP = new ActiveXObject(MSXML[n]);
& I N! [8 l- ~# N1 i! N8 U; Ybreak; $ c. j6 ~, x" P) I
} catch(e) { 0 w8 \" E* e! `+ J* W! n
} 1 ]" } U/ u) m- i% c& V9 E
} 8 [" `! W- w5 p# h
} 4 L) y3 R2 z, w! k/ a3 h& x
6 P' k9 {( ~5 a& t" I$ P# jobjXMLHTTP.open("POST", "_blank>http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp", false);
: w) C' d( P0 [# y, x0 h( jobjXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
4 p, U* ^! |: J) Y VobjXMLHTTP.setRequestHeader("Connection", "Keep-Alive");
/ T R) [6 {& k& V; {$ m0 m' IobjXMLHTTP.send("qq=" + qq + "&pwd=" + pwd + "&FromWhere=register"); & V1 ]! Z& F' k1 U" \# E
2 f* K- Y a5 p2 v2 Oif (objXMLHTTP.responseText.indexOf("验证失败") > 0) {
- R9 i$ e/ ?" C' e2 d5 F8 j; halert("登录失败"); : W# D# W5 x! _0 Q$ E
} else {
8 G+ x. r( x) I! }2 M; ]alert("等录成功");
, l2 o- u3 O ]4 F2 z} / M: d/ [' _. e G# K( u. W
</script>
9 v% G6 g! J0 r9 t |
|