php - Show part of a IP address -
php - Show part of a IP address -
85.124.99.2
how can hide lastly 2 numbers ip?
and create like:
86.124.xxx.xxx
wrote quickly
$ip = "85.124.99.2"; $parts = explode('.',$ip); $new_ip = $parts[0].'.'.$parts[1].'.xxx.xxx';
warning: should test length of parts before accessing $parts[n]
php string ip-address
Comments
Post a Comment