Skip to content

Instantly share code, notes, and snippets.

@jiskanulo
Last active April 12, 2016 11:15
Show Gist options
  • Save jiskanulo/f41dd7e90ad046fb0dd8 to your computer and use it in GitHub Desktop.
Save jiskanulo/f41dd7e90ad046fb0dd8 to your computer and use it in GitHub Desktop.
phpinfo
<?php
// validate client ip address
$allow_ips = [
'::1',
'10.0.2.2',
'127.0.0.1',
'192.168.33.1',
];
if (! in_array(filter_input(INPUT_SERVER, 'REMOTE_ADDR'), $allow_ips)) {
header('HTTP/1.0 404 Not Found');
exit;
}
// show phpinfo
phpinfo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment