I gang

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

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 "[url removed, login to view]" 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 "[url removed, login to view]" 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 "[url removed, login to view]" (ByVal hFile As Long, ByVal sBuffer As String, ByVal lNumBytesToRead As Long, lNumberOfBytesRead As Long) As Integer

Public Declare Function InternetCloseHandle Lib "[url removed, login to view]" (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: [url removed, login to view] 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.

Færdigheder: Software Arkitektur, Software Testning, Visual Basic, Windows API, Windows Skrivebord

Se mere: free proxy url, web proxy free, web app freelancers, vb source code, string the, software testing for freelancers, proxy testing software, is there an app for freelancers, get code freelancers, free software freelancers, freelancers the loop, freelancers one, freelancers for testing, freelancers for code, first source, find the solution to, find the solution for, find the solution, find freelancers for free, find free freelancers, code for me freelancers, app to get freelancers, app to find freelancers, find a code app, visual basic 6.0

Om arbejdsgiveren:
( 59 bedømmelser ) La Plata, Argentina

Projekt-ID: #5197562

Tildelt til:

nikhiltechnology

Hello, I am vb6.0 expert I can provide proper solution to fetch the HTML code for the URL I can start this project immediately. Regards Nikhil

$30 USD in 3 dage
(12 bedømmelser)
4.7

5 freelancers are bidding on average $33 for this job

yubor

Hi. In the past I developed vb6 app that use WinInet API for reading sites via proxy. Can remake your code to achieve this goal. Regards, Yuri

$30 USD in 3 dage
(30 bedømmelser)
4.4
proxcoder

A proposal has not yet been provided

$25 USD in 3 dage
(28 bedømmelser)
3.3
gamboy214

Are you gonna use this for scrapping? can you check if this one will work SAMPLE FILE HERE [url removed, login to view]

$50 USD på 1 dag
(4 bedømmelser)
2.7
johnlord332

Dear Sir, I am a Professional Programmer since 2008, I have many programs developed and successfully finished in my past employer, I am expert in IT Industry both Hardware and Software Programming, I will give you t Mere

$30 USD på 1 dag
(0 bedømmelser)
0.0