PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Function ASP_FUNCTION(sUserName)
Dim DataToSend, xmlhttp, sReturnValue
DataToSend = sUserName
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.Open "POST","http://SOMEHOST.COM/ABC.JSP",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send DataToSend
sReturnValue = xmlhttp.responseText
Set xmlhttp = nothing
wm_setRestrictIP = sReturnValue
End Function
Hi all, the above code is ASP function, is it possible to make it runnable in PHP? How? I've googled it, just that all is JScript with PHP, is it possible to make a function in PHP, too?
Function ASP_FUNCTION(sUserName)
Dim DataToSend, xmlhttp, sReturnValue
DataToSend = sUserName
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.Open "POST","http://SOMEHOST.COM/ABC.JSP",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send DataToSend
sReturnValue = xmlhttp.responseText
Set xmlhttp = nothing
wm_setRestrictIP = sReturnValue
End Function
Hi all, the above code is ASP function, is it possible to make it runnable in PHP? How? I've googled it, just that all is JScript with PHP, is it possible to make a function in PHP, too?
You could write some PHP code that does exactly the same thing though. All that code does is fetch "http://SOMEHOST.COM/ABC.JSP" with sUserName as a POST variable and the content header set to "application/x-www-form-urlencoded". It'd be pretty easy in PHP if you use CURL.