Skip to content

Instantly share code, notes, and snippets.

@xurizaemon
Created February 13, 2012 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xurizaemon/1819391 to your computer and use it in GitHub Desktop.
Save xurizaemon/1819391 to your computer and use it in GitHub Desktop.
why? so that they didn't see lots of 404s for favicon.ico?
<?php
if( $_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1')
{
ob_start();
phpinfo();
$pinfo = ob_get_contents();
ob_end_clean();
echo str_replace( '<head>', '<head><link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />', $pinfo);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment