Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- PSN Update Finder 1.0
- Finds PSN links to updates with the title id.
- Based on Awesome Update Finder by NZHawk
- Copyright (C) 2010 Yifan Lu
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- define('URL' , 'http://localhost/psn_update_finder.php'); // For the "Back" link
- echo '
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta name="description" content="Find PS3 game updates instantly." />
- <meta name="keywords" content="ps3,psn,update,jailbreak,game,games,updates,playstation,sony,backups,backup" />
- <meta name="author" content="Yifan Lu" />
- <title>PSN Update Finder</title>
- <style type="text/css">
- table.content {
- border-width: 1px;
- border-spacing: ;
- border-style: outset;
- border-color: gray;
- border-collapse: separate;
- background-color: white;
- }
- table.content th {
- border-width: 1px;
- padding: 1px;
- border-style: inset;
- border-color: gray;
- background-color: white;
- -moz-border-radius: ;
- }
- table.content td {
- border-width: 1px;
- padding: 1px;
- border-style: inset;
- border-color: gray;
- background-color: white;
- -moz-border-radius: ;
- }
- </style>
- </head>
- <body>
- <h1>PSN Update Finder</h1>
- <hr>
- ';
- $titleid = $_GET['titleid'];
- $env = $_GET['env'];
- if(!empty($titleid)){
- $url = "https://a0.ww." . urlencode($env) . ".dl.playstation.net/tpl/" . urlencode($env) . "/" . $titleid . "/" . $titleid . "-ver.xml";
- try{
- $xml = @new SimpleXMLElement($url, LIBXML_COMPACT, TRUE);
- }catch(Exception $ex){
- die("Invalid title id!");
- }
- echo '<table class="content"><tbody><tr><th>Version</th><th>URL</th><th>Size</th><th>Checksum (SHA1)</th><th>PS3 Min Version</th></tr>';
- foreach ($xml->tag->package as $package){
- echo '<tr>' .
- '<td><strong>' . $package['version'] . '</strong></td>' .
- '<td><a href="' . $package['url'] . '">' . $package['url'] . '</a></td>' .
- '<td>' . $package['size'] . '</td>' .
- '<td>' . $package['sha1sum'] . '</td>' .
- '<td>' . $package['ps3_system_ver'] . '</td>' .
- '</tr>';
- if(!empty($package->paramsfo)){
- $title = htmlentities($package->paramsfo->TITLE);
- $latest = htmlentities($package->paramsfo->TITLE_01);
- }
- }
- echo '</tbody></table><br />';
- echo '<p><strong>Game:</strong> ' . $title . '<br /><strong>Latest Version:</strong> ' . $latest . '<br /><a href="'. URL .'">« Back</a></p>';
- }else{
- echo '
- <p>Based on/ripped off of <a href="http://nzhawk.mezoka.com/awesomeuf/">NZHawk\'s Awesome Update Finder</a>, just type in the title id (If you don\'t know, it\'s the name of the ripped game\'s folder).</p>
- <form method="GET">
- <label for="titleid">Title ID:<label/> <input type="text" name="titleid" id="titleid" /><br />
- <label for="env">Environment:</label> <select id="env" name="env"><option value="na" selected="true">na (Retail)</option><option value="prod-qa">prod-qa (Debugish)</option><option value="sp-int">sp-int (Debug)</option></select><br />
- <input type="submit" value="Find Updates" />
- </form>
- ';
- }
- echo '<hr>
- <em>Coded by <a href="http://www.yifanlu.com/">Yifan Lu</a></em><br />
- </body></html>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement