PHP for dealing with IP Address searching

So, we’ve got a home-grown device/IP/network management system at work. Backend’s Postgres/PHP, front end is horrible and hilariously ugly. It works, mostly. Since I’m the only one with any skills in the space, it falls to me to find ways to Make Things Better.

Today’s fun was making the search box a little less horrible - searching for devices in in a subnet wasn’t easy unless you wanted to find the subnet’s location, then drill down from there.

This is the function which looks at what someone has entered into the box then makes a little SQL snippet. It’ll return False if you’ve entered something it doesn’t know how to deal with (which the display code handles).

This howto helped a lot, well worth checking out if you need info on how to do subnet calculations etc.

`So, we’ve got a home-grown device/IP/network management system at work. Backend’s Postgres/PHP, front end is horrible and hilariously ugly. It works, mostly. Since I’m the only one with any skills in the space, it falls to me to find ways to Make Things Better.

Today’s fun was making the search box a little less horrible - searching for devices in in a subnet wasn’t easy unless you wanted to find the subnet’s location, then drill down from there.

This is the function which looks at what someone has entered into the box then makes a little SQL snippet. It’ll return False if you’ve entered something it doesn’t know how to deal with (which the display code handles).

This howto helped a lot, well worth checking out if you need info on how to do subnet calculations etc.

`

 



#coding #php #Programming #Work