Re: Running script on remote server

From: Date: Mon, 19 Mar 2001 14:53:57 +0000
Subject: Re: Running script on remote server
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44556@lists.php.net to get a copy of this message
On Sat, Mar 17, 2001 at 05:27:55PM +1300, Patrick Dunford wrote: > The example in the Help shows opening a file at > http://www.php.net/ with > fopen(). Are they accessing the source code of the script, or the HTML code > that is output by the PHP server when it runs the PHP script that it loads > from that location? They are only accessing the HTML code that the PHP program outputs. kA > What I want to be able to do is, to get around the problem that the server > that I am running my site on does not have database, I want to run the > database on another server elsewhere on the Web. I want to be able to, by > fopen() -ing the page via its URL, to be passing some variables to the > script, have the remote PHP server run the script and pass back to me the > output as a file, which I can then load into my web page and display. I have done something similar once when dealing with an IMAP server. The website did not have IMAP support compiled in, but the IMAP server did have PHP installed with IMAP support. Rather than adding support to the webserver, I was forced to do some scripting on the remote IMAP server. I just did includes and sent the variables the remote script needed. <?php include("http://www.remoteimapserver.com/remote.php?neededvariable=neededvalue"); ?> Anything the remote.php file outputs will be output into the HTML of the calling program. Anyone accessing the website has no idea that the page they are viewing is coming from 2 different servers. -- Jason Stechschulte jpstech@unoh.edu -- signal(i, SIG_DFL); /* crunch, crunch, crunch */ -- Larry Wall in doarg.c from the perl source code

« previous php.general (#44556) next »