麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
麻烦热心的高手来看看,帮助我把这段ASP转成PHP看看!
悬赏分:20 - 2007年08月21日

以下的是ASP代码,因为本人水平太莱,搞不成功,望热心的高手帮助翻译成PHP!不胜感激!


<%

'接受程序--------------------------------------------------------------------------


myUserID=trim(request("myUserID"))
username=trim(request("username"))
cardID=trim(request("password"))
MobilePhone=trim(request("MobilePhone"))
ip=Request.ServerVariables("REMOTE_ADDR")
password=request("password")
action=request("action")
ServiceUrl=Request.ServerVariables("HTTP_REFERER")

mobile=MobilePhone
'。。。。。。。判断手机号码正确性。。。。。。。。。
'处理程序--------------------------------------------------------------------------



userNumber=MobilePhone '用户手机号
ip=Request.ServerVariables("REMOTE_ADDR")


if session("sValue") = "" then
sValue = 0
else
sValue = cint(session("sValue"))
end if

if isnumeric(userNumber) then

if len(cardID) > 0 then
PostUrl="http://www.text.com/tele.jsp?mobileNumber="&userNumber&"&f=662&feeCodeID=1&userIP="&ip&"®URL="&ServiceUrl&"&channelName=8002&cardID=" & cardID
Rvalue2=SendToSp23(PostUrl)
Rvalue2=Bytes2bStr34(Rvalue2)
Rvalue2 = Replace(Rvalue2,chr(10),"")
Rvalue2 = Replace(Rvalue2,chr(13),"")
Rvalue2 = Replace(Rvalue2,chr(32),"")
Rvalue2 = Trim(Rvalue2)

'if request("flag") = "1" then
'Rvalue2 = "0_5"
'end if

if left(Rvalue2,1) = "0" then

sValueCurrent = cint(Replace(Rvalue2,"0_",""))

session("sValue") = sValue + sValueCurrent

if sValue + sValueCurrent < 30 then
%>
<script LANGUAGE="JavaScript">

</script>
<%
else
%>
<script LANGUAGE="JavaScript">

</script>
<%
end if
else
%>
<script LANGUAGE="JavaScript">

</script>
<%
end if

end if


end if


sub alert(code)
if viewValue<>code then
printStr=Errinfo&"("&viewValue&"),请稍后再试!"
call printAlert(printStr,0)
end if
end sub
sub printAlert(printStr,isClose)
if isClose="1" then
cmd="window.close();"
else
cmd="history.go(-1);"
end if
response.Write "<script LANGUAGE=JavaScript>alert('"&printStr&"');"&cmd&"</script>"
response.End
end sub

Function SendToSp23(PostUrl)
Server.ScriptTimeOut=72000

Set oXMLHttp = createObject("Microsoft.XMLHTTP")
Call oXMLHttp.Open("get", PostUrl, false)
Call oXMLHttp.Send("")
sHtmlStr = oXMLHttp.responseBody
Set oXMLHttp = nothing

SendToSp23=sHtmlStr
End Function


Function Bytes2bStr34(p_sHtmlStr)
dim sReturnStr
dim i,n
sReturnStr = ""
n = LenB(p_sHtmlStr)

For i = 1 To n
dim sCharCode
dim sNextCharCode
sCharCode = AscB( MidB(p_sHtmlStr, i, 1) )

If (sCharCode < &H80) Then
sReturnStr = sReturnStr & Chr(sCharCode)
Else
sNextCharCode = AscB( MidB(p_sHtmlStr, i+1, 1) )
sReturnStr = sReturnStr & Chr(CLng(sCharCode) * &H100 + CInt(sNextCharCode))
i = i + 1
End If
Next

Bytes2bStr34 = sReturnStr
End Function
%>

提问者:织网人生   08-21 16:04
答复
路过。。。顺便帮顶:)
回答者:玉米づ冰冻可乐 - 瓦岗村民 8-22 09:10
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
68 + 58 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM