In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // sweeper.php - public domain | |
| // まずは試しに ..../sweeper.php?debug=1で実行してください | |
| $sweep_dir = "/tmp/data/"; // 消したいディレクトリ ex) "/tmp/data/" 最後の/は必須です | |
| $expire_at = 30; // ファイルを保存する日数を設定します | |
| $debug = array_key_exists('debug', $_GET); | |
| date_default_timezone_set('Asia/Tokyo'); | |
| $num = sweep_files($sweep_dir, $expire_at ,$debug); |