in reply to Re: execute script on remote server
in thread execute script on remote server

hmm.... i would love to use modules, but sys admin is tricky, which module would you suggest? http-request is my route... all my remote script does is fire off an email via sendmail to say the first script has been run... if this can all be done without sending content to the browser, thanks fruiture!
  • Comment on Re: Re: execute script on remote server

Replies are listed 'Best First'.
Re: Re: Re: execute script on remote server
by fruiture (Curate) on Aug 30, 2002 at 10:26 UTC

    Then you need LWP(libwww-perl) (LWP::UserAgent and dependencies, LWP::Simple is usefull). On a good server with Perl, LWP should be installed anyway, a good sys admin will realize that :)

    --
    http://fruiture.de
      Thanks! LWP::UserAgent works a treat! you are a star!
      #!D:/Perl/bin/perl.exe require LWP::UserAgent; my $ua = LWP::UserAgent->new(env_proxy => 1, keep_alive => 1, timeout => 30, ); $request = HTTP::Request->new('GET', 'http://foo.co/cgi/remote.cgi'); $response = $ua->request($request);
Re: Re: Re: execute script on remote server
by sedhed (Scribe) on Aug 30, 2002 at 22:17 UTC

    As others have said, for your specific case, I would bypass the whole remote thing and have the original script send the email.

    If that's not possible, or for other situations, I sometimes use an image link that points to a second/remote script, which does whatever it needs to do and just returns a single pixel image to the browser.*

    * This technique is often referred to as a 'web bug', and though it has a bad rap for inappropriate and malicious use by banner advertisers and spammers, the technique itself is often perfect for legitimate purposes as well.

    cheers!