|
|
Snippet Name: Find IP from Hostname
Description: This often works better than using gethostbyname() or other native functions:
Comment: (none)
Language: PHP
Highlight Mode: PHP
Last Modified: February 27th, 2009
|
<?PHP
$ip = RTRIM(`/usr/bin/dig $host A +short | /usr/bin/tail -1`);
?> |
|
|
|
|
|