|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
calling a script on another server from within a script
Hi
This thing really foxes me. I have a script on one server and I need to call an executable script on another server, effectively as an external sub-routine. I have full access for setting permissions on both servers. I tried :- require "http://domain/cgi-binscript.pl"; and - of course - it failed ("Can't locate http://domain/cgi-bin/welcome.pl in @INC ... etc...") Any ideas? Or can anyone give me a word which exists in the Cookbook index so I can read up on it? Thanks |
|
#2
|
|||
|
|||
|
Code:
use lib '/path/to/script'; require script.pl; You have to use a full path, not a URL.
__________________
- dsb - ![]() Perl Guy |
|
#3
|
|||
|
|||
|
Thanks dsb
I tried:- ------------------------------------------- use lib 'mirror1.domain.com/usr/local/etc/httpd/cgi-bin/game.pl'; require "game.pl"; -------------------------------------------- and it just called the local version of game.pl It's late here, so I can't see what it is I'm missing .... ![]() |
|
#4
|
||||
|
||||
|
I'm not aware of an easy way to call another script the way you're trying to across a domain. If on *nix, you could map the remote drive to your local drive with nfs to have a local mount point, and then use that local mount point in the path for your require. Talk to your sysadmin about this.
Can you include the contents of the other script with an exec SSI in a static HTML file? I've never tried spanning a domain before with SSI. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > calling a script on another server from within a script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|