hey you guys, I have this code from many months ago:
echo '<tr>';
$index = 0;
foreach ($row as $key => $col) {
if ($index === 0) { echo "<td><a href='https://whatismyipaddress.com/ip-lookup' target='_blank'>$col<a/></td>"; }
else { echo "<td>$col</td>"; }
$index++;
}
echo '</tr>';
what I would like to do is sort out my superglobals so I can extract the actual IP and let the user click the link and send them to a page like this: https://whatismyipaddress.com/ip/173.28.215.223
I can surely get the data I want from the server var, but the issue is, I don’t think there is one to do what I want, is there? what I’ve noticed is that, depending on the requesting computer, the data can be in all sorts of formats. here is what I’m current capturing with:
gethostbyaddr($_SERVER['REMOTE_ADDR']);
thanks!