Solved

Inet Proxy Connection Troubles

Posted on 2004-10-07
1
584 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now