note 28406 deleted from function.explode by kennyt
| From: | kennyt@php.net | Date: | Sat, 28 Feb 2004 20:30:15 +0000 |
| Subject: | note 28406 deleted from function.explode by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-65954@lists.php.net to get a copy of this message | ||
Note Submitter: elajt@elajt.net
----
Since i thought that there wasn't any ipv6 lookup
function, i created this that makes it work.
<?php
/* This script will lookup the ipv6 addr */
/* Requires: host */
/* Comments: elajt@elajt.net */
$hostpath = "/usr/bin/host";
$host = gethostbyaddr($REMOTE_ADDR);
$output = exec("$hostpath -t AAAA $host");
$pieces = explode(" ", $output);
echo $pieces[4];
?>