Advertisement
crayawn

PSN Home Avatar Grabber

Jun 20th, 2013
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. <?php
  2.  
  3. if(isset($_POST['submit'])) {
  4.     if(!$_POST['psuser']) echo("Enter your Playstation Network username.");
  5.     else echo('<img src="http://playstationhome.jp/community/mypage.php?ActionCD=Avatar&&OnlineID='.$_POST['psuser'].'"><br />');
  6. }
  7. if(isset($_POST['download'])) {
  8.     if(!$_POST['psuser']) echo("Enter your Playstation Network username to download the image.");
  9.     else {
  10.         $file_url = 'http://playstationhome.jp/community/mypage.php?ActionCD=Avatar&&OnlineID='.$_POST['psuser'];
  11.         $file_name = $_POST['psuser'].".jpg";
  12.         header('Content-Type: application/octet-stream');
  13.         header("Content-Transfer-Encoding: Binary");
  14.         header("Content-disposition: attachment; filename=\"".$file_name."\"");
  15.         readfile($file_url);
  16.     }
  17. }
  18.  
  19. ?>
  20. <LINK href="avatar.css" rel="stylesheet" type="text/css">
  21. <form action="" method="post">
  22. <input type="text" placeholder="PSN Username" class="input_text" name="psuser"><br />
  23.     <input type="submit" name="submit" class="input_submit alt" value="Show Avatar"> | <input type="submit" class="input_submit alt"  name="download" value="Download Avatar">
  24. </form>
  25. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement