ASPHttp (Hent via HTTP)
Med ASPHttp har du mulighed for POST, GET og Head forespørgelser vi HTTP protocollen.
ASPHttp funktionsliste
GET, HEAD and POST request methods
Response headers are exposed
Accept headers are modifiable
Adjustable timeout
Proxy support
Custom User-Agent headers
Custom Content-Type headers for POST
Redirection
Supports authentication areas (Basic only, NOT NTLM)
Retrieves URLs to a file including binary files
Allows custom HTTP request headers
asphttppost.asp
Nedenfor vises hvordan du poster variabler:
Set HttpObj = Server.CreateObject(“AspHTTP.Conn”)
HttpObj.Url = “http://www.dandomain.dk/support/asp-scripts/asphttppost.asp”
HttpObj.PostData = “name=dandomain&tlfnr=87779045”
HttpObj.RequestMethod = “POST”
strResult = HttpObj.GetURL
SET HTTPobj = nothing
asphttpget.asp
Her vises hvordan du Get’er en hjemmeside
Set HttpObj = Server.CreateObject(“AspHTTP.Conn”)
HttpObj.Url = “http://www.dandomain.dk”
StrResult = HttpObj.GetURL
STRresult=server.htmlencode(STRresult)
Response.write STRresult
SET HTTPobj = nothing
Se dokumentation på ASPHttp ServerObjects