Filter FILTER_VALIDATE_IP December 27, 2011 Pramod T P Leave a comment Check whether the given IP is valid or not Example ====== <?php if(filter_var(“345.454.3.3”, FILTER_VALIDATE_IP)) { echo “Valid IP”; }else{ echo “invalid IP”; } ?> Output ===== invalid IP