Re: [PHP] find out ip address [beginner]

2004-05-25 Thread Tobes
My page is supposed to compare the client IP address to the IP address of an
other webserver. I have that domain name and would like to find out it's IP
address. Unfortunately its IP address changes regularly (dynamic dns) so
that gethostbyname() does not work (it caches the IP address).
I am working on PHP4 and can't patch / update / anything the system. I
couldn't even tell you what exact version and plugins, etc is running on
that web server I am working on.

Any more info needed to answer this question? Feel free to ask...

Thanks for all help in advance

Tobes

Chris W. Parker [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Tobes mailto:[EMAIL PROTECTED]
on Monday, May 24, 2004 2:09 PM said:

 hi, i need some code to find out the ip address of a server. just a
 simple dns query.

 how do i do that? i'm a beginner, please help.

are you saying you already have the FQDN (Fully Qualified Domain Name)?
or are you trying to get the ip address of the client system requesting
your page?



chris.

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



Re: [PHP] find out ip address [beginner]

2004-05-25 Thread Matt Matijevich
could you ping or gethostip that webserver using the sytem command, then
parse what you recieve?

$val = system ('ping -c 1 outherwebserver');
or
$val = system ('gethostip outherwebserver');
//then parse $val to pull out the ip address

there is probably a better way to do it though, not even sure it if
that will work.

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



[PHP] find out ip address [beginner]

2004-05-24 Thread Tobes
hi, i need some code to find out the ip address of a server. just a simple
dns query.

how do i do that? i'm a beginner, please help.

thanks in advance

tobes

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



RE: [PHP] find out ip address [beginner]

2004-05-24 Thread Chris W. Parker
Tobes mailto:[EMAIL PROTECTED]
on Monday, May 24, 2004 2:09 PM said:

 hi, i need some code to find out the ip address of a server. just a
 simple dns query.
 
 how do i do that? i'm a beginner, please help.

are you saying you already have the FQDN (Fully Qualified Domain Name)?
or are you trying to get the ip address of the client system requesting
your page?



chris.

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



RE: [PHP] find out ip address [beginner]

2004-05-24 Thread Rick Fletcher
 hi, i need some code to find out the ip address of a server. 
 just a simple dns query.
 
 how do i do that? i'm a beginner, please help.

$ip = gethostbyname( www.php.net );

http://www.php.net/manual/en/function.gethostbyname.php

--Rick

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