Rodolfo Bandeira

Rodolfo Bandeira

software, electronics, security, devops, thoughts

How to sum a number to an IP Address using PHP?

Hi there!

Today I got a situation that I needed to sum a number to an IP Address. So.. check this simple solution to solve it using PHP:

echo long2ip( ip2long("") + 1);

You can see this code running in this website:


Last modified: