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 Link to comment https://forums.phpfreaks.com/topic/19895-change-ip-from-0000000000-to-000000/ 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. Link to comment https://forums.phpfreaks.com/topic/19895-change-ip-from-0000000000-to-000000/#findComment-87051 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.... Link to comment https://forums.phpfreaks.com/topic/19895-change-ip-from-0000000000-to-000000/#findComment-87059 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] Link to comment https://forums.phpfreaks.com/topic/19895-change-ip-from-0000000000-to-000000/#findComment-87063 Share on other sites More sharing options...
brown2005 Posted September 6, 2006 Author Share Posted September 6, 2006 thanks very much Link to comment https://forums.phpfreaks.com/topic/19895-change-ip-from-0000000000-to-000000/#findComment-87074 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.