Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2002
Posts: 77
Member
Member
Offline
Joined: May 2002
Posts: 77
Is there any way to run a CGI program located on a different server via SSI????

I need to share some dynamic content with another website, but I obviously don't want to give him any script that includes my database login information. His server is NT using ASP pages and mine is Linux running PHP pages. Any suggestions??? I am getting REALLY frustrated. Everything I have tried doesn't seem to work.

Any help would be GREATLY, GREALY appreciated.

Thanks!

Sponsored Links
Joined: May 2002
Posts: 77
Member
Member
Offline
Joined: May 2002
Posts: 77
Okay, well now I know that I can't call use a SSI with a CGI script located on a different server.

There has got to be a way to share the results of a MySQL query with another server without giving them full access to my entire database.

Any ideas?

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
hmmm... can you print it to a text file on the one server and do a virtual include to the other?


- Allen wavey
- What Drives You?
Joined: May 2002
Posts: 77
Member
Member
Offline
Joined: May 2002
Posts: 77
I think I might have to dump to an XML file, but I was hoping to avoid that because the contents of the table changes frequently. I guess whenever someone makes a change I can have it create an updated version of the XML file. Now I just need to write a little CGI program to get the XML file, parse it and output the info in the proper format. Then the other guy can put the CGI program on his server and do an include. He doesn't have any idea how to work with XML himself, so I'll need to make a program for him.

Thanks Allen for the suggestion. If anybody has any other suggestions, I'd still love to hear them.

Thanks!

Joined: Apr 2002
Posts: 111
PF Offline
Member
Member
Offline
Joined: Apr 2002
Posts: 111
Get PHP to fopen the url for the cgi script on the other server and print out the results?
then you can include the php script in your SSI.
http://www.php.net/manual/en/function.fopen.php
smile

Sponsored Links
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
or create an extra script and configure its output format as;

document.write("result1");
document.write("result2");
document.write("result3");

then, he/she can call it like;

t type="text/javascript" src="http://yoursite/some.php">pt>

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Another option would be SSIing a script that makes the request to the site, i.e.:

#!/usr/bin/perl
use CGI qw(:standard);
use LWP::Simple;
print header . get("http://yoursite/some.php");


UBB.classic: Love it or hate it, it was mine.
Joined: May 2002
Posts: 77
Member
Member
Offline
Joined: May 2002
Posts: 77
Thanks for the ideas! I'll give them a shot!

You guys are lifesavers (what flavor is up to you.. haha)


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)