Script Execution at another domain


How can I execute a script on another machine?

I need this to keep 2 identical passwordfiles on 2 different
machines accurate.

1. The snippet should connect to the following url
   http://www.2domain.com/script.cgi?username=A&password=B

2. If for any reason the server is not reachable, the script should stop
if .....?

print "Please try again in a few minutes";
exit;

 (to prevent any change to the local passwordfile)



if connection failed


BigiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
hedjConnect With a Mentor Commented:
I'm not sure if this is so much a Perl question but a UNIX question.  To perform remote commands you need to use the rsh command.  Make sure that on your remote server you are accepting remote commands.  To do this from within perl, you can do something like this:


$command="rsh userid@domain <command>";
$results = qx{ $command };


0
 
BigiAuthor Commented:
I get "select: protocol failure in circuit setup"
Does it not need the password for the remote host?

Or how can I call the script by http? (linux is not installed
on my server)
0
All Courses

From novice to tech pro — start learning today.