PDA

View Full Version : Show last part of ip address


Brian
Wed 1st Nov '00, 7:46pm
How can I show last part of peoples ip's when they post ie: xxx.92.192.44

Stallion
Thu 2nd Nov '00, 5:40pm
Not sure why'd you want the last, as users are best identified by the beginning...

Anyways, I'll give you some off-the-top-of-my-head-pointers:
$ipbits = explode(".", $user['ip');
// $user['ip'] needs to be the reference to the ip field in the query for users.
$ipbits = array($ipbits[1], $ipbits[2], $ipbits[3]);
$ipbits = "*".implode(".",$ipbits);
// Now just reference $ipbits in your template

Brian
Thu 2nd Nov '00, 10:14pm
Well basically we are having problem with people posting under numerous names and would like people to see their ip's at least most of it to deter people as they know others will bust them....

-Brian