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
[EMAIL PROTECTED]
--
signal(i, SIG_DFL); /* crunch, crunch, crunch */
             -- Larry Wall in doarg.c from the perl source code

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to