Hi, I have been succesfull accessing a site Http://ich.... , now the site start using ssl Https:// and I get a 301 Moved Permanent, and show Location https://ich....., can someone please help me fix the code, thanks
in advance. Tony

------------------------------------------------------------
Function URLstripHttP(ByVal tUrl$) As String
tUrl$ = Trim(tUrl$)
If Left$(LCase(tUrl$), 7) = "http://" Then
URLstripHttP$ = Right$(tUrl$, Len(tUrl$) - 7)
Else: URLstripHttP$ = tUrl$
End If
End Function
----------------------------------------------------------------------
Function URLHost(ByVal tUrl$) As String
tUrl$ = Trim(tUrl$)
tUrl$ = URLstripHttP(tUrl$)
pos = InStr(tUrl$, "/")
If pos = 0 Then
URLHost$ = tUrl$
Else
URLHost$ = Left(tUrl$, pos - 1)
End If
End Function
------------------------------------------------------------------------
Function URLDocument(ByVal tUrl$) As String
tUrl$ = Trim(tUrl$)
tUrl$ = URLstripHttP(tUrl$)
For A = 1 To Len(tUrl$)
If Mid$(tUrl$, A, 1) = "/" Then
URLDocument = Right$(tUrl$, Len(tUrl$) - A)
Exit Function
End If
Next
URLDocument = "": Exit Function 'Not Found
End Function
------------------------------------------------------------------
Function UrlMsg$(ByVal tUrl$) ' pretend to be a browser
tDocument$ = URLDocument(tUrl$)
Dim tHost$

Msg$ = ""
Msg$ = Msg$ + "GET /" & tDocument$ & " HTTP/1.1" & vbCrLf
Msg$ = Msg$ & "Host:" & URLHost(tUrl$) & vbCrLf 'NEW LINE ADDED
Msg$ = Msg$ + "Accept: */*" & vbCrLf
Msg$ = Msg$ + "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & vbCrLf
Msg$ = Msg$ + "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0" & vbCrLf
Msg$ = Msg$ + "Accept-Language: en-us,en;q=0.5" & vbCrLf
Msg$ = Msg$ + "Connection: Close" & vbCrLf


Msg$ = Msg$ & vbCrLf
UrlMsg$ = Msg$
End Function
---------------------------------------------------------------------