|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp可以使用微软的activeX使得网页功能无比强大,不过安全性也较差,而且是基于的windows服务器,所以性能稳定性也一般js|网页|源代码明:此代码合适你做网站用,一般伴侣能够不必理这个器材!
ASP:
<%
dimobjXMLHTTP,qq,pwd
qq="10000"
pwd="123456"
setobjXMLHTTP=Server.CreateObject("MSXML2.XMLHTTP.5.0")
objXMLHTTP.open"POST",http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp,false
objXMLHTTP.setRequestHeader"Content-Type","application/x-www-form-urlencoded"
objXMLHTTP.setRequestHeader"Connection","Keep-Alive"
objXMLHTTP.send("qq="&qq&"&pwd="&pwd&"&FromWhere=register")
ifInStr(objXMLHTTP.responseText,"考证失利")then
response.write"登录失利"
else
response.write"登录乐成"
endif
setobjXMLHTTP=nothing
%>
PHP:
CODE:
<php
$qq="100000";//qq号码
$pwd="123456";//暗码
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);//这行是设定curl是不是跟从header发送的location,主要
curl_setopt($ch,CURLOPT_POST,1);
//curl_setopt($ch,"Connection","Keep-Alive");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"qq=".$qq."&pwd=".$pwd."&FromWhere=register");
$return=curl_exec($ch);
curl_close($ch);
echostrstr($return,"postfield")?"登录失利":"登录乐成";
?>
JS:
CODE:
<scripttype="text/javascript">
varqq="100000";//qq号码
varpwd="123456";//暗码
if(window.XMLHttpRequest){
varx=newXMLHttpRequest();
}else{
varMSXML=newArray(MSXML2.XMLHTTP.5.0,MSXML2.XMLHTTP.4.0,MSXML2.XMLHTTP.3.0,MSXML2.XMLHTTP,Microsoft.XMLHTTP);
for(varn=0;n<MSXML.length;n++){
try{
varobjXMLHTTP=newActiveXObject(MSXML[n]);
break;
}catch(e){
}
}
}
objXMLHTTP.open("POST","http://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp",false);
objXMLHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
objXMLHTTP.setRequestHeader("Connection","Keep-Alive");
objXMLHTTP.send("qq="+qq+"&pwd="+pwd+"&FromWhere=register");
if(objXMLHTTP.responseText.indexOf("考证失利")>0){
alert("登录失利");
}else{
alert("等录乐成");
}
</script>
asp,你就只能等着微软给你解决,它不乐意你就只好悲催。而且asp跑在windows服务器上,windows服务器跟linux比起来简直弱爆了! |
|