Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing or requiring a file on another server

Status
Not open for further replies.

Eloff

Programmer
Aug 29, 2001
78
CA
Is it possible? How would I go about doing this? I have func.cgi on one server, and a script that uses functions from it on another server. I do not wish to place them both on the same server so any suggestions? Age: 17
School: Alberta Distance Learning Center
Location: British Columbia, Canada
If at first you dont't succeed, try, try again. - programmer's motto.
 
1) send query to another server over http protocol
perldoc LWP::Simple
etc...

2) ssh protocol:
perldoc Net::perl::SSH
or
system ("ssh ...")
perldoc Expect
 
I've used the LWP module to do what you want. The trick is that you have to make the output from the called cgi program look like something a browser can use. That means it must first have a content-type header, and then either text or html, depending on which content type you told it to expect. I think I've posted some sample code in this forum. If not, I can post or email some. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top