CodeIgniter verifying IP addresses, codeigniter verifying IP
The example in this article describes the method of CodeIgniter verifying an IP address. Share to everyone for your reference. The specific analysis is as follows:
This demonstrates how CodeIgniter obtains the User IP address while verifying the validity of the IP address
Get User ip:
$this->input->ip_address ();//If the IP acquisition fails, then return 0.0.0.0, we can also use the following code to verify the validity of the IP $ip = "192.168.1.1"; if (! $this INPUT->VALID_IP ($IP)) {echo "Not a valid IP address";} else{echo "Valid IP address!";}
I hope this article is helpful to everyone based on CodeIgniter PHP program design.
http://www.bkjia.com/PHPjc/970971.html www.bkjia.com true http://www.bkjia.com/PHPjc/970971.html techarticle CodeIgniter Verify IP Address method, CodeIgniter Verify IP This article describes codeigniter verifying the IP address. Share to everyone for your reference. The specific analysis is as follows: Here is a demonstration ...