Home » , » Validate IPv4 Address in PHP

Validate IPv4 Address in PHP

Written By Unknown on Minggu, 24 November 2013 | 08.45

Today I am going to tell how to validate IPv4 / IP address using PHP. Simple function which will used to check client IP address is valid or not.

Steps to validate IPv4 Address in PHP
  • Split IP address into segments  by dot(.)  using explode function
  • Make sure that there are 4 segments (eg : 192.168.1.45)
  • Make sure that IP cannot start with 0
  • IP segments must be digits & cannot be longer than 3 digits or greater than 255
To read more about this article Click Here

For Demo Click Here
Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger