vb6 wininet
Private Const UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.1.4322)" 'InternetOpenA Private Declare Function InternetOpen Lib "wininet.dll" Alias _ "InternetOpenA" (ByVal lpszCallerName As String, _ ByVal dwAccessType As Long, ByVal lpszProxyName As String, _ ByVal lpszProxyBypass As String, ByVal dwFlags As Long) As Long 'InternetConnectA Private Declare Function InternetConnect Lib "wininet.dll" Alias _ "InternetConnectA" (ByVal hInternetSession As Long, _ ByVal lpszServerName As String, ByVal nProxyPort As Integer, _ ByVal lpszUsername As String, ByVal lpszPassword As String, _ ByVal dwService As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long 'HttpQueryInfo Private Declare Function HttpQueryInfo Lib "wininet.dll" Alias _ "HttpQueryInfoA" (ByVal hHttpRequest As Long, ByVal lInfoLevel As Long, _ ByVal sBuffer As Any, ByRef lBufferLength As Long, ByRef lIndex As Long) As Integer 'InternetOpenUrlA 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 'InternetReadFile Private Declare Function InternetReadFile Lib "wininet.dll" _ (ByVal hFile As Long, ByVal sBuffer As String, _ ByVal lNumBytesToRead As Long, lNumberOfBytesRead As Long) As Integer 'HttpOpenRequest Private Declare Function HttpOpenRequest Lib "wininet.dll" Alias _ "HttpOpenRequestA" (ByVal hInternetSession As Long, ByVal lpszVerb As String, _ ByVal lpszObjectName As String, ByVal lpszVersion As String, ByVal lpszReferer As String, _ ByVal lpszAcceptTypes As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long 'HttpSendRequest Private Declare Function HttpSendRequest Lib "wininet.dll" Alias _ "HttpSendRequestA" (ByVal hHttpRequest As Long, ByVal sHeaders As String, _ ByVal lHeadersLength As Long, ByVal sOptional As String, ByVal lOptionalLength As Long) As Boolean 'InternetCloseHandle Private Declare Function InternetCloseHandle Lib "wininet.dll" _ (ByVal hInternetHandle As Long) As Boolean 'HttpAddRequestHeaders Private Declare Function HttpAddRequestHeaders Lib "wininet.dll" Alias _ "HttpAddRequestHeadersA" (ByVal hHttpRequest As Long, ByVal sHeaders As String, _ ByVal lHeadersLength As Long, ByVal lModifiers As Long) As Integer