Display code or content for selected IP only
Category: PHP code examples
Example code below. To display your IP, uncomment the line with “echo”:
<?php $visit_ip = $_SERVER["REMOTE_ADDR"]; /* echo $visit_ip; */ /* Change to your IP */ if ($visit_ip != '00.00.00.00') { /* hidden code or content */ ?> <!-- a place to insert html code --> <?php } ?>