I'm looking to convert a cidr prefix (e.g. /28) to a netmask (e.g. 255.255.255.240) and have not located a function for this, does one exist in php? If not, how would I go about doing this?
Ok, now I'm aware that similar questions have probably been asked a million times but I'm a real novice at this and I'd really appreciate your help here.
Basically, I want to store the visitors IP address in a MySQL …
I have a question with variable : $_SERVER['REMOTE_ADDR'].
I wish he recovers ONLY IP addresses in IPv4 format .
It extracted me a few times in IPv6 format .
How to do?