|
-
Jul 5th, 2001, 10:45 AM
#1
Thread Starter
New Member
Silly Newbie Question
Greetings, I hope this isn't too stupid of a newbie question.
I'm looking to write a VB script/form on my box that goes out and accesses a perl script on a remote server.
The perl script is designed to monitor a few different servers for connectivity, etc... I want the script to run once a minute, but since I am putting it on a server I don't control, I'm writing a VB program on my server to go out and run the perl script once a minute...
I need to know if using the Microsoft Winsock Control is the way to go. And if so, how would one run a perl script remotely??
Hope this makes sense..
Regards,
Shane
-
Jul 5th, 2001, 12:53 PM
#2
Black Cat
How would you call the script remotely? If it's web accessible, you could use Winsock easily. Just connect to your server and send something like the following:
VB Code:
"GET /cgi-bin/script.pl HTTP/1.0" & vbcrlf & vbcrlf
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jul 5th, 2001, 01:36 PM
#3
Thread Starter
New Member
That doesn't seem to work
Josh,
Here's what I have so far:
Private Sub Command1_Click()
Winsock1.RemoteHost = "127.0.0.1"
Winsock1.RemotePort = 80
Winsock1.Connect
Do Until Winsock1.State = sckConnected
DoEvents: DoEvents: DoEvents: DoEvents
Loop
Winsock1.Close
End Sub
I'm assuming I need something prior to the Winsock1.Close statement that actually runs the perl script...
Thanks,
Shane
-
Jul 5th, 2001, 01:58 PM
#4
Black Cat
Once you're connected, request the script via HTTP, like I showed above.
VB Code:
Winsock1.SendData "Whatever"
Then the DataArrival event should fire if it the script returns a web page or anything, and then the connection should close (test and make sure, though).
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
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
|