ip condition in php code example Example: ip condition in php if ($_SERVER['REMOTE_ADDR'] == 'xxx.xxx.xxx.x' ) { //your code here }