calling cgi on server from vb5

I use the following code in a loop to send e-mails to a list of people.  The cgi (perl5) contains all the information except the names.

Link = "" & name
ShellExecute Me.hwnd, "Open", Link, 0&, 0&, 5

The problem is that the browser keeps coming up and prevents other activity on the computer.  Is there a way to call a cgi file without the browser displaying on my screen?
Who is Participating?
vasu_iConnect With a Mentor Commented:
This method uses winsock. If your environment provides winsock control that is enough. A direct call to web server. Here the coding. Place a winsock control on the form and write this function.

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim response As String
Winsock1.GetData response, vbString
End Sub

Sub ExecCGI(iden as String)
Winsock1.RemoteHost="your server ip"
Winsock1.SendData "Get /cgi-bin/yyy.cgi?" & iden & " HTTP/1.0" & vbCrLf & vbCrLf
End Sub

Execute the procedure ExecCGI with every identity.
please see search the complete apps section for

Internet ActiveX Controls - Retrieve HTML pages from the Net - Post data to HTTP server
Use the Internet Transfer Control and execute a Post.

From Books Online:

This same query could be sent using the Execute method as shown below:
Dim strURL As String, strFormData As String
strURL = "//"
strFormData = "find=Hangzhou"
Inet1.Execute strURL, "POST", strFormData

If you are expecting a result back from a server (as in the example above), you must use the GetChunk method to retrieve the resulting HTML document.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

You could use add the Microsoft Internet Controls to your program, hide it on your form and do:

Dim lName As String

lName = "your user name(s)"

WebBrowser1.Navigate "" & lName

Do While WebBrowser1.Busy = True

The CGI will execute and you will not see a browser...

donb1Author Commented:
I am running vb5.  I have sp3 installed.  sdland1's answer requires vb6.

When I try to use the Internet Transfer Control, I get an ocx file out of date.  It runs on my computer, but not on others.  I would like to use this control, but don't know what to do to make it work on other computers.  I use the setup wizard in vb5 to generate the application.
donb1Author Commented:
msinet.ocx is the one that reports as out of date.  How can I make it OK?
donb1Author Commented:
Haven't had time to try this yet, but it looks like it should work.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.