Skip to content

Instantly share code, notes, and snippets.

@apermo
Created March 8, 2021 12:04
Show Gist options
  • Save apermo/90ac90713d9fa8765765f54fd2dd8a2f to your computer and use it in GitHub Desktop.
Save apermo/90ac90713d9fa8765765f54fd2dd8a2f to your computer and use it in GitHub Desktop.
A small snippet around the phpinfo(); to have a self destructing phpinfo that deletes itself after 3600s
<?php
// file is older than 3600s, better delete this.
if ( filemtime( __FILE__ ) + 3600 < time() ) {
unlink( __FILE__ );
header( "HTTP/1.0 404 Not Found" );
exit();
}
phpinfo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment