diff --git a/.gitignore b/.gitignore index 99a03f7..adb9462 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ pkg/* nps-backup/* decrypted-files/* gameinfo/* +dl4u/* # php-proxy, unrelated to psmreborn 1337/* diff --git a/.htaccess b/.htaccess old mode 100755 new mode 100644 diff --git a/404.php b/404.php old mode 100755 new mode 100644 diff --git a/common.js b/common.js old mode 100755 new mode 100644 diff --git a/common.php b/common.php old mode 100755 new mode 100644 index ad6729f..b5b203f --- a/common.php +++ b/common.php @@ -7,10 +7,25 @@ function update_rifs() if(time() > $npsTime + 60) { - rename("NpsPsm.tsv","nps-backup/NpsPsm_".strval($npsTime).".tsv"); - rename("NpsPendingPsm.tsv","nps-backup/NpsPendingPsm_".strval($npsPendingTime).".tsv"); - file_put_contents("NpsPsm.tsv", file_get_contents("http://nopaystation.com/tsv/PSM_GAMES.tsv")); - file_put_contents("NpsPendingPsm.tsv", file_get_contents("https://nopaystation.com/tsv/pending/PSM_GAMES.tsv")); + $nps_psm_games = file_get_contents("http://nopaystation.com/tsv/PSM_GAMES.tsv"); + $nps_psm_pending = file_get_contents("https://nopaystation.com/tsv/pending/PSM_GAMES.tsv"); + + $nps_psm_md5 = md5(file_get_contents("NpsPsm.tsv"), false); + $nps_psm_pending_md5 = md5(file_get_contents("NpsPendingPsm.tsv"), false); + + $nps_backup_path = "nps-backup/NpsPsm_".$nps_psm_md5.".tsv"; + $nps_pending_backup_path = "nps-backup/NpsPendingPsm_".$nps_psm_pending_md5.".tsv"; + + if(!file_exists($nps_backup_path)) { + rename("NpsPsm.tsv", $nps_backup_path); + } + + if(!file_exists($nps_pending_backup_path)) { + rename("NpsPendingPsm.tsv", $nps_pending_backup_path); + } + + file_put_contents("NpsPsm.tsv", $nps_psm_games); + file_put_contents("NpsPendingPsm.tsv", $nps_psm_pending); } } update_rifs(); diff --git a/devtools.php b/devtools.php old mode 100755 new mode 100644 diff --git a/faq.php b/faq.php old mode 100755 new mode 100644 diff --git a/favicon.ico b/favicon.ico old mode 100755 new mode 100644 diff --git a/header.php b/header.php old mode 100755 new mode 100644 diff --git a/img/androiddev.png b/img/androiddev.png old mode 100755 new mode 100644 diff --git a/img/apk-icon.png b/img/apk-icon.png old mode 100755 new mode 100644 diff --git a/img/cmbackup.png b/img/cmbackup.png old mode 100755 new mode 100644 diff --git a/img/docs.png b/img/docs.png old mode 100755 new mode 100644 diff --git a/img/export.png b/img/export.png old mode 100755 new mode 100644 diff --git a/img/games.png b/img/games.png old mode 100755 new mode 100644 diff --git a/img/kernel-plugin.png b/img/kernel-plugin.png old mode 100755 new mode 100644 diff --git a/img/logo.png b/img/logo.png old mode 100755 new mode 100644 diff --git a/img/mono.png b/img/mono.png old mode 100755 new mode 100644 diff --git a/img/pending_playable.png b/img/pending_playable.png old mode 100755 new mode 100644 diff --git a/img/pkg.png b/img/pkg.png old mode 100755 new mode 100644 diff --git a/img/playable.png b/img/playable.png old mode 100755 new mode 100644 diff --git a/img/ppk_icon.png b/img/ppk_icon.png old mode 100755 new mode 100644 diff --git a/img/psdp.png b/img/psdp.png old mode 100755 new mode 100644 diff --git a/img/psm-drivers.png b/img/psm-drivers.png old mode 100755 new mode 100644 diff --git a/img/psm_bg.gif b/img/psm_bg.gif old mode 100755 new mode 100644 diff --git a/img/psm_bg.png b/img/psm_bg.png old mode 100755 new mode 100644 diff --git a/img/psm_icon.png b/img/psm_icon.png old mode 100755 new mode 100644 diff --git a/img/psmda_keys.png b/img/psmda_keys.png old mode 100755 new mode 100644 diff --git a/img/psmdev.png b/img/psmdev.png old mode 100755 new mode 100644 diff --git a/img/psmruntime.png b/img/psmruntime.png old mode 100755 new mode 100644 diff --git a/img/sdk.png b/img/sdk.png old mode 100755 new mode 100644 diff --git a/img/simulator.png b/img/simulator.png old mode 100755 new mode 100644 diff --git a/img/sources.png b/img/sources.png old mode 100755 new mode 100644 diff --git a/img/tools.png b/img/tools.png old mode 100755 new mode 100644 diff --git a/img/twitter.png b/img/twitter.png old mode 100755 new mode 100644 diff --git a/img/unity.png b/img/unity.png old mode 100755 new mode 100644 diff --git a/img/unity_icon.png b/img/unity_icon.png old mode 100755 new mode 100644 diff --git a/img/unitydev.png b/img/unitydev.png old mode 100755 new mode 100644 diff --git a/img/user-plugin.png b/img/user-plugin.png old mode 100755 new mode 100644 diff --git a/img/youtube.png b/img/youtube.png old mode 100755 new mode 100644 diff --git a/img/zip_icon.png b/img/zip_icon.png old mode 100755 new mode 100644 diff --git a/index.php b/index.php old mode 100755 new mode 100644 diff --git a/libary.php b/libary.php old mode 100755 new mode 100644 diff --git a/redirect.php b/redirect.php old mode 100755 new mode 100644 diff --git a/robots.txt b/robots.txt old mode 100755 new mode 100644 diff --git a/sitemap.xml b/sitemap.xml old mode 100755 new mode 100644 diff --git a/style.css b/style.css old mode 100755 new mode 100644 diff --git a/videos/china.mp4 b/videos/china.mp4 old mode 100755 new mode 100644 diff --git a/wget.php b/wget.php old mode 100755 new mode 100644 diff --git a/zrif.js b/zrif.js old mode 100755 new mode 100644