Running script on remote server

From: Date: Sat, 17 Mar 2001 04:27:55 +0000
Subject: Running script on remote server
Groups: php.general 
Request: Send a blank email to php-general+get-44356@lists.php.net to get a copy of this message
The PHP 4.0 manual contains this information: --------------------------------------------- Chapter 20. Using remote files As long as support for the "URL fopen wrapper" is enabled when you configure PHP (which it is unless you explicitly pass the --disable-url-fopen-wrapper flag to configure (for versions up to 4.0.3) or set allow_url_fopen to off in php.ini (for newer versions), you can use HTTP and FTP URLs with most functions that take a filename as a parameter, including the require() and include() statements. Note: You can't use remote files in include() and require() statements on Windows. For example, you can use this to open a file on a remote web server, parse the output for the data you want, and then use that data in a database query, or simply to output it in a style matching the rest of your website. --------------------------------------------- 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? 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. ======================================================================= Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ You are all sons of God through faith in Christ Jesus, for all of you who were baptized into Christ have clothed yourselves with Christ. -- Galatians 3:26-27 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010316 ======================================================================= Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

« previous php.general (#44356) next »