For example if IP address is 64.12.34.56, I want to display it like 64.12.34.**
Here is my code
$this_ip="64.12.34.56";
$this_sub_ip=substr($this_ip, 0, strrpos($this_ip, ".")+1);
$this_sub_ip_replace_length=strlen($this_ip)-strlen($this_sub_ip);
for ($index=0; $index<$this_sub_ip_replace_length; $index++)
{
$this_sub_ip=$this_sub_ip."*";
}
echo ($this_sub_id);
A little bit too much for a simple requests. I am looking for simpler solution if there is. Any advice?
Thanks!