get ip

Post Reply
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

get ip

Post by sourceuno »

How can I retrieve the IP address of the machine that I'm running a Vortex script from? I tried using $SERVER_NAME but that returns nothing.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

get ip

Post by John »

Is $REMOTE_ADDR what you want, or maybe $HTTP_HOST is?
John Turnbull
Thunderstone Software
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

get ip

Post by sourceuno »

I'm trying to retrieve the IP address for a script run from the command line. Is it possible using these variables?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

get ip

Post by Kai »

No. These variables are set by the web server for the CGI environment, when Vortex runs from a web server. To get the local IP address of the machine while running from the command-line would require platform-specific calls unavailable in Vortex. Under Unix, you might be able to <EXEC> the "hostname" command, then use <nslookup> to resolve that name.
Post Reply