brown2005 Posted September 6, 2006 Share Posted September 6, 2006 hi... i wondered if it was possible to take an IP address and keep the digits at the front and end and use # or * fro the middle two...?RegardsRichard Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 6, 2006 Share Posted September 6, 2006 why would you want to do this the ansaw is yes you can do it with eregi but why i ask becouse ip always change unless static.most isp use dynamic so the change is always unless you get a static ip your lucky. Quote Link to comment Share on other sites More sharing options...
brown2005 Posted September 6, 2006 Author Share Posted September 6, 2006 well i was using ip's to record hits.... Quote Link to comment Share on other sites More sharing options...
.josh Posted September 6, 2006 Share Posted September 6, 2006 [tt]GhettoCode[sup]TM[/sup][/tt][code]<?php function mask_ip($ip) { $ip = explode(".", $ip); $ip[1] = "###"; $ip[2] = "###"; $ip = implode(".", $ip); return $ip; } $ip = "123.123.123.123"; // example $ip = mask_ip($ip); // useage?>[/code] Quote Link to comment Share on other sites More sharing options...
brown2005 Posted September 6, 2006 Author Share Posted September 6, 2006 thanks very much Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.