Regarding this well-known quote, often attributed to miles111's famous "20
Jan 2004 21:44:16 -0800" speech:
Basically, can I execute a php script from within a php script? Heres
some details:
I'm using a remote script to get my local ip address using
$HTTP_SERVER_VARS['REMOTE_ADDR'];
This works. Now I want to run a local php script to call the remote
script and return my ip address. Any Ideas? Thanks! -bp
Just use a GET redirect (Assuming you're running Apache+php on your local
system):
To get an IP from local to remote (in a script running locally):
header("Location: http://remoteserver.com/ip.php?local=$myIPAddress")
To get an IP from remote to local (in a script running remotely):
header("Location: http://127.0.0.1/ip.php?remote=$theirIPAddress")
--
-- Rudy Fleminger
--
sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
--
http://www.pixelsaredead.com