denyIpAddress - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of denyIpAddress.php
- <?php
- $thisIp ='36.55.84.121';
- $denyIpAddress = array(
- '36.55.84.121',
- '192.168.56.1',
- '10.0.20.22'
- );
- if ( !empty($thisIp) ) {
- if ( in_array($thisIp, $denyIpAddress, TRUE) ) {
- printf("Cannot use this IP Address: %s", $thisIp);
- }
- else {
- printf("we're good to proceed!");
- }
- }
File Description
- denyIpAddress
- PHP Code
- 06 Feb-2020
- 321 Bytes
You can Share it:
Latest PHP Pastes