Написал программу:
- Код: Выделить всё
Const INTERNET_OPEN_TYPE_PRECONFIG = 0
Const INTERNET_OPEN_TYPE_DIRECT = 1
Const INTERNET_OPEN_TYPE_PROXY = 3
Const INTERNET_FLAG_RELOAD = &H80000000
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function InternetOpenUrl Lib "wininet.dll" Alias "InternetOpenUrlA" (ByVal hOpen As Long, ByVal sURL As String, ByVal sHeaders As String, ByVal lLength As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
Private Declare Function InternetReadFile Lib "wininet.dll" (ByVal hFile As Long, ByVal sBuffer As String, ByVal lNumBytesToRead As Long, lNumberOfBytesRead As Long) As Integer
Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer
Private Sub Command1_Click()
Dim hInternetSession As Long
Dim hURL As Long
Dim bResult As Boolean
Dim cBuffer As String * 30000 '4096
'Make internet connection.
hInternetSession = InternetOpen("Microsoft Internet Explorer", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
'Make connection to desired page.
hURL = InternetOpenUrl(hInternetSession, Text2, vbNullString, 0, 0, 0)
'Read page into memory buffer.
bResult = InternetReadFile(hURL, cBuffer, 30000, dwBytesRead)
Text1 = cBuffer
'Close down connections.
InternetCloseHandle (hURL)
InternetCloseHandle (hInternetSession)
End Sub
При открытии "https://www.site.com/4366" всё проходит гладко, но
при открытии "https://www.site.com/4366#!tab=din&page=2" возникает ошибка 400 - не правильный URL.
Подскажите как это победить