|
-
Jul 13th, 2003, 11:35 AM
#1
Thread Starter
Hyperactive Member
Proxy a Web Browser?
I need to make a program that will go through a Proxy server to check websites.
But i need it to change the ip of a web browser...
I seen sample code of how to get to a ftp, but how could i use it to get it to get the web site:
Code:
'MORE INFORMATION
Private Sub Command1_Click()
Inet1.AccessType = icNamedProxy
' Using an CERN proxy server won't work here, you need to
' use a FTP proxy server when making FTP requests
' because CERN proxy servers don't accept FTP requests.
' Inet1.Proxy = "http://itgproxy:80"
Inet1.Proxy = "ftp=ftp://ftp-gw"
'FTP proxy server works here because it expects FTP requests
Inet1.URL = "ftp://ftp.microsoft.com"
Inet1.Execute , "DIR"
End Sub
Private Sub Command2_Click()
Inet2.AccessType = icNamedProxy
' Using a FTP proxy server doesn't work because you are
' making an HTTP request to a FTP proxy server.
'Inet2.Proxy = "ftp=ftp://ftp-gw"
Inet2.Proxy = "http://proxy:80"
'CERN proxy server works here because it expects HTTP requests.
MsgBox Inet1.OpenURL("http://www.microsoft.com")
End Sub
Private Sub Command3_Click()
Inet3.AccessType = icNamedProxy
' Or you could assign both the CERN proxy server
' and the FTP proxy server and the Internet Transfer
' Control will route it to the correct one
Inet3.Proxy = "ftp=ftp://ftp-gw http=http://itgproxy:80"
MsgBox Inet2.OpenURL("http://www.microsoft.com")
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim vtData As Variant ' Data variable.
Select Case State
' ... Other cases not shown.
Case icResponseCompleted ' 12
' Open a file to write to.
Open "c:\temp\output.txt" For Binary Access _
Write As #1
' Get the first chunk. NOTE: specify a Byte
' array (icByteArray) to retrieve a binary file.
vtData = Inet1.GetChunk(1024, icString)
Do While LenB(vtData) > 0
Put #1, , vtData
' Get next chunk.
vtData = Inet1.GetChunk(1024, icString)
Loop
Put #1, , vtData
Close #1
End Select
End Sub
Last edited by $uper-$tar; Jul 13th, 2003 at 03:20 PM.
-
Jul 13th, 2003, 03:56 PM
#2
Thread Starter
Hyperactive Member
Hrm
I can get the html into a text box, but it cuts it off... any suggestions on getting the full html?
(Plus the man question, get what the server sends back in the web browser)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|