Author: Padroni Language: php
Description: Self Destructing PHP File Timestamp: 2015-02-11 04:38:14 -0500
View raw paste Reply
  1. <?php class Delete
  2. {
  3.     function __destruct()
  4.     {
  5.         unlink(__FILE__);
  6.     }
  7. }
  8. $g_delete_on_exit = new Delete();
  9. ?>
  10.  
  11.  
  12. Add this code to the end of any PHP file to make it self-destruct either on Refresh or exit (browser/tab close)
  13.  
  14. Useful if you’re using custom shell / mailer scripts.
View raw paste Reply