Log in

View Full Version : WOL show both host and ip


Jenta
01-25-2005, 04:44 AM
I have my WOL setting to resolve hosts but would like to add a <br> and then show the IP under the hostname.

This looks like a real small edit to online.php and whosonlinebit template. Something with gethostbyaddr but I'm not familiar enough to do this.

Can anyone offer any tips or tell me how?

sabret00the
01-25-2005, 01:59 PM
isn't this a stock option?

Jenta
01-26-2005, 08:12 AM
:rolleyes:
figured it out

$userinfo["$key"]['host'] = @gethostbyaddr($users['host']);
$userinfo["$key"]['ip'] = ($users['host']); <-- add this

then use it in onlinebits something along the lines of this...


<if condition="$show['ip']">
<td class="$ipclass"><div class="smallfont"><strong>Host Name:</strong> $userinfo[host]<br /><strong>IP:</strong> <a href="http://www.whois.sc/$userinfo[ip]" target="_blank">$userinfo[ip]</a><if condition="$show['useragent']"><br /><strong>Browser:</strong> $userinfo[useragent]</if></div></td>
</if>