Salut a tous, Je voudrais traduir, des pages asp , en php. Mais le probleme c est que je ne connais pas tellement l asp (surtout en ce qui concerne les base de donnees). Je mets les lignes en couleur qui me pose des problemes. Pourriez vous m aider svp Merci
<code> If Session("APCODE" ) <> "" Then dim xmlhttpcheck, xmlhttpconfirm, oxml, xml_url_check, xml_url_confirm, xml_text, xmlresponse
Marsh Posté le 02-10-2007 à 14:22:48
Salut a tous,
Je voudrais traduir, des pages asp , en php.
Mais le probleme c est que je ne connais pas tellement l asp (surtout en ce qui concerne les base de donnees).
Je mets les lignes en couleur qui me pose des problemes.
Pourriez vous m aider svp
Merci
<code>
If Session("APCODE" ) <> "" Then
dim xmlhttpcheck, xmlhttpconfirm, oxml, xml_url_check, xml_url_confirm, xml_text, xmlresponse
xml_url_confirm = "http://www.spam.com/check/vf.php4?AUTH=132705/364804/2346162&CODE=" & Session("APCODE" ) & "&MAXT=3"
set xmlhttpconfirm = server.createobject("Microsoft.XMLHTTP" )
xmlhttpconfirm.open "GET", xml_url_confirm, false
xmlhttpconfirm.send()
xmlresponse = xmlhttpconfirm.responsetext
set xmlhttpconfirm = nothing
resultat = xmlresponse
If (Mid(resultat, 1, 2) = "OK" ) Then
If (Mid(resultat, 5, 1) = "S" ) Or Mid(resultat, 5, 1) = "T" Then
response.write "sms"
APtype = "SMS"
Else
'response.write "audiotel"
APtype = "AudioTel"
End If
Set DBCMD = Server.CreateObject("ADODB.Command" )
Set Rs = Server.CreateObject("ADODB.RecordSet" )
With DBCMD
.ActiveConnection = conStrAcct
.CommandText = "sp_AlloPass"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("@UserId", adVarChar, adParamInput, 20, Session("uid" ))
.Parameters.Append .CreateParameter("@UserIP", adVarChar, adParamInput, 15, Trim(Request.ServerVariables("REMOTE_ADDR" )))
.Parameters.Append .CreateParameter("@APcode", adVarChar, adParamInput, 50, Session("APCODE" ))
.Parameters.Append .CreateParameter("@APtype", adVarChar, adParamInput, 10, APtype)
.Parameters.Append .CreateParameter("@ReturnFlag", adChar, adParamOutput, 1)
.Parameters.Append .CreateParameter("@nbdays", adChar, adParamOutput, 3)
.Parameters.Append .CreateParameter("@aid", adChar, adParamOutput, 6)
.Execute
AID = .Parameters.item("@AID" ).Value
nbdays = .Parameters.item("@nbdays" ).Value
Flag = .Parameters.item("@ReturnFlag" ).Value
End With
Set DBCMD = Nothing
DBCON.Close
</code>