Wednesday, March 19, 2008

Server Side Ajax for Classic ASP

There is probably a better name that Server-Side Ajax. its cool to be able to do this.


dim objSrvHTTP

Set objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.3.0")
call objSrvHTTP.open ("GET","http://www.govwaudi.com", false)
call objSrvHTTP.send ()
Response.Write (objSrvHTTP.responseText)



dim objSrvHTTP
Set objSrvHTTP = Server.CreateObject ("Msxml2.ServerXMLHTTP.3.0")
call objSrvHTTP.open ("POST","http://www.example.com/test.asp?algo=1", false)
call objSrvHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
call objSrvHTTP.send ("variablename=value")
dim answer
answer = objSrvHTTP.responseText


Is there an easy way to do this in php?

No comments: