Forum Moderators: open
Classic ASP, you'll have to write a DLL that uses API calls and call it from the web. The API calls are in the WinInet library and are fairly complicated.
Let me know which way and maybe I can help, this is actually my neck of the woods.
Imports System.Net
Imports System.IO
Public Function OpenURL(ByVal sURL As String) As String
Dim objRequest As HttpWebRequest
Dim objResponse As HttpWebResponse
objRequest = CType(WebRequest.Create(sURL ), HttpWebRequest)
objRequest.ContentType = "application/x-www-form-urlencoded"
objRequest.Method = "POST" ' Or GET
objRequest.Timeout = 10 'Could have trouble connecting
bjResponse = CType(objRequest.GetResponse(), HttpWebResponse)
If objResponse.StatusCode <> HttpStatusCode.OK Then
'Unsuccessful
OpenURL= objResponse.StatusDescription
Else
'Successful - Read into StreamReader Object
srTemp = New System.IO.StreamReader(objResponse.GetResponseStream())
OpenURL = srTemp.ReadToEnd()
End If
objResponse.Close()
objResponse = Nothing
objRequest = Nothing
End Function
Probably want to wrap the GetResponse in a Try/Catch so you can trap any errors TCP/IP could potentially throw at you.