Re: Reading registry values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, July 31, 2007 4:54 pm, \"Crash\" Dummy wrote:
> To answer everyone's curiosity as to why I want to access the
> registry, I am
> working on my home computer with a dynamic IP, and I need to know what
> it is so
> I can modify my httpd.conf (or hosts) file, if necessary.

LOL

Take a look at whats in $_SERVER:

<?php var_dump($_SERVER);?>

Your IP address is almost for sure in $_SERVER['HOST_ADDR']

That is filled in by the web-server, and should reflect your actual
current IP address.

If you have a NAT-ing router in between, then, no, it won't be your
"public" IP...  At that point, I'd almost suggest bypassing the
Registry and COM flakiness and see if something like this works:
http://l-i-e.com/ip.htm
http://l-i-e.com/ip.phps

ymmv, but I'd much rather trust an external server than some goofy
Windows registry setting... :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux