Hello friends
I am working on an applicaion in which in the config file i had made a hard code of the local server. Now is there is any way that i can get the ip address of the server and can access the images accordingly,i had made the application of register_global=on
So plz. suggest me by considering that it is on.
Looking for repply.
Thanks
Problem Regarding server ip address
Moderator: General Moderators
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
- Pointybeard
- Forum Commoner
- Posts: 71
- Joined: Wed Sep 03, 2003 7:23 pm
- Location: Brisbane, AUS
- Contact:
-
Straterra
- Forum Regular
- Posts: 527
- Joined: Mon Nov 24, 2003 8:46 am
- Location: Indianapolis, Indiana
- Contact:
IMHO, the only truly accurate way to find out one's IP adress is for another to tell him his IP adress. When I write Legacy VB (4, 5, 6) programs, I simply get the HTML code from http://www.whatismyip.com and parse out the IP. You could from there compare the predefined to the parsed IP. They should match, but if they don't, I would use the parsed IP.
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
uhh... yes $_SERVER['SERVER_ADDR'] is too valid. I use it in quite a few of my projects.evilcoder wrote:Thats not a valid $_SERVER variant. Its $_SERVER["HTTP_HOST"]
http://px.sklar.com/code.html?id=1000
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
I believe it is undocumented.
Try:
Among others; you'll see:
Try:
Code: Select all
print '<pre>';
print_r($_SERVER);Code: Select all
$_SERVER['SERVER_ADDR']- Pointybeard
- Forum Commoner
- Posts: 71
- Joined: Wed Sep 03, 2003 7:23 pm
- Location: Brisbane, AUS
- Contact: