Hey,
Building one of them funky IP -> Node scripts; here's an example (It's for a friend) .
http://nodelookup.mcprohosting.com/index.php
The idea of this; is to A) Allow customers to enter their IP of their server; and get an output of a node number which will then lead them to a service page to see what their node is doing, weather it's down or not; most likely a pingdom monitoring page or something.
I was just curious, I was writing the validation of data and came accross the filter_var($unIP, FILTER_VALIDATE_IP)
function; now, when you think that PHP is now validating the inputted data to be an 'ip' is there any need to do MYSQL escapes?
I'm going to throw them in anyway, since it's just 'good' 'secure' practice to; however why have code there, that has no purpose? I picked the filter_var function over the regex function which would do the exact same because it's A) Cleaner and already verified, there's no need for regex validation if there's already a working function in the version of PHP I'm using (Latest 5).
Anybody have any views?