Read the Source Code of one URL using Proxy with VB 6.0

IN PROGRESS
Bids
5
Avg Bid (USD)
$33
Project Budget (USD)
$10 - $30

Project Description:
Hello freelancers, hope you will help to me to find a solution for this issue I have:
I'm using an app developed with Visual Basic 6.0 and try to get the Source Code of one URL using a function called "ReadURL()".

That function is working fine without proxy uses, but now, I have to use proxies for that andI can't find the solution for that. I've tried modifying the code below, filling with proxies and ports, but that doesn't work.

If you can correct that and find the better solution for this issue I'll award you instantly. just show me the solution is working.
Below you will see the code I'm using for that app:


Public 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
Public Declare Function InternetOpenUrl Lib "wininet.dll" Alias "InternetOpenUrlA" (ByVal hInternetSession As Long, ByVal sURL As String, ByVal sHeaders As String, ByVal lHeadersLength As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
Public Declare Function InternetReadFile Lib "wininet.dll" (ByVal hFile As Long, ByVal sBuffer As String, ByVal lNumBytesToRead As Long, lNumberOfBytesRead As Long) As Integer
Public Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer
Public Const IF_NO_CACHE_WRITE = &H4000000
Public Const BUFFER_LEN = 256

Public Function ReadURL(sURL As String) As String
Dim sBuffer As String * BUFFER_LEN, iResult As Integer, sData As String
Dim hInternet As Long, hSession As Long, lReturn As Long



'get the handle of the current internet connection
hSession = InternetOpen("vb wininet", 1, vbNullString, vbNullString, 0)

'get the handle of the url
If hSession Then
hInternet = InternetOpenUrl(hSession, sURL, vbNullString, 0, IF_NO_CACHE_WRITE, 0)
End If


'if we have the handle, then start reading the web page
If hInternet Then
'get the first chunk & buffer it.
iResult = InternetReadFile(hInternet, sBuffer, BUFFER_LEN, lReturn)
sData = sBuffer

'if there’s more data then keep reading it into the buffer
Do While lReturn <> 0
iResult = InternetReadFile(hInternet, sBuffer, BUFFER_LEN, lReturn)
sData = sData + Mid(sBuffer, 1, lReturn)
Loop
End If

'close the URL
iResult = InternetCloseHandle(hInternet)

LeeURL = sData 'here is the source code of the URL readed and is what I need using PROXY

'A sample of a proxy I have to use is: IP ADDRESS: 54.54.54.54 and PORT ADDRESS: 54221
'(is just a sample, that proxy is not working. To try you may use a free proxy you can find over there)

'End of source code...


Thanks freelancers and good luck with this.
Regards.

Skills required:
Software Architecture, Software Testing, Visual Basic, Windows API, Windows Desktop
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 30
in 3 days
$ 30
in 3 days
$ 25
in 3 days
$ 50
in 1 days
$ 30
in 1 days