短网址跳转长连接时,参数之间的 & 被改为:&

cg5696 2018-08-13 06:43:55
生成的短网址的代码,原来用的好好的,没有做任何修改,最近打开后,跳转的长连接中把 &转义成为:&这样就不通了
也就是说:生成的短网址跳转后,用户名和密码之间本来是 & 连接的,现在改为:& 就出错了
http://www.baidu.net/members/logincheckgt.asp?username=lzfyjd&password=888888

原代码为:

Function BytesToBstr(body,Cset)
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then Newstring=Len(wstr)
End Function
'抓取网页内容的函数
Function getPageContent(Url)
Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "Get", Url, False, "", ""
objXMLHTTP.Send
getPageContent = BytesToBstr(objXMLHTTP.ResponseBody,"UTF-8")
Set objXMLHTTP = Nothing
End Function

set rs = server.createobject("adodb.recordset")
sql="select uid,username,password,dalei1 from weixin_duanxin where dalei1 = '"&request.queryString("dalei1")&"'"
rs.open sql,ZGW_Conn,1,1

username = trim(rs("username"))
password = trim(rs("password"))
tempResult = getPageContent("http://api.ft12.com/api.php?url=" & Server.UrlEncode(" http://www.baidu.net/members/logincheckgt.asp?username="&username&"&password="&password&""))

response.Write tempResult
response.end

敬请高手给予指点
...全文
1077 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
cg5696 2018-08-13
  • 打赏
  • 举报
回复
谢谢啦!!!!!!
fss_love 2018-08-13
  • 打赏
  • 举报
回复
http://api.ft12.com/api.php接口本身的问题,替换成http://suo.im/api.php这个接口即可解决问题。

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧