Solved

Inet Proxy Connection Troubles

Posted on 2004-10-07
1
580 Views
Last Modified: 2013-12-26
Hello,

   Using vb6 and the Inet control, I am trying to register a unique visit on a remote web server by using inet1.openurl("ww.theurl.com") , but when the operation is complete, the inet contro has downloaded the source of the page, but the remote server does not reccognize that there has been a connection or request. I've also tried, winsock with the same results. As well I've tried the webbrowser control, but I cant seem to send the proper headers to the server to make my server log a different IP address.

   Please can anyone tell me how I would send a reccognized request to a remote server and mask my ip.
0
Comment
Question by:prodesign777
1 Comment
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 500 total points
ID: 12256404
There's an issue with the Web Server or it's "hit counting" scripts then. It's possible they only track certain browsers.

This should sent common headers:

Form1:
--------------

Private Sub Form_Load()
    Dim strSrvr As String
    Dim strHdrs As String
    Dim strRecv As String
    strSrvr = "www.yahoo.com"
    strHdrs = strHdrs & "Accept: */*" & vbCrLf
    strHdrs = strHdrs & "Accept -Language: en -us" & vbCrLf
    strHdrs = strHdrs & "Accept -Encoding: gzip , deflate" & vbCrLf
    strHdrs = strHdrs & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" & vbCrLf
    strHdrs = strHdrs & "Host: " & strSrvr & vbCrLf
    strHdrs = strHdrs & "Connection: Keep -Alive" & vbCrLf & vbCrLf
    With Inet1
        .Cancel
        .RemoteHost = strSrvr
        .RemotePort = 80
        .Execute strSrvr, "GET", , strHdrs
    End With
End Sub
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now