Advertisement
irokemr

Shop Fortnite

Nov 5th, 2019
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5.  
  6.  
  7. // Creado por Jose89FCB
  8. $page= file_get_contents("https://fnitemshop.000webhostapp.com/shop.php");
  9.  
  10. $imagen1 = explode ('"full_background":"', $page);
  11. $imagen2 = explode ('"', $imagen1[1]);
  12.  
  13.  
  14.  
  15.  
  16.  
  17. $imagefile = $imagen2[0];
  18.  
  19. /**
  20.  * Opens new image
  21.  *
  22.  * @param $filename
  23.  */
  24. function icreate($filename)
  25. {
  26.   $isize = getimagesize($filename);
  27.   if ($isize['mime']=='image/jpeg')
  28.     return imagecreatefromjpeg($filename);
  29.   elseif ($isize['mime']=='image/png')
  30.     return imagecreatefrompng($filename);
  31.   /* Add as many formats as you can */
  32. }
  33.  
  34. /**
  35.  * Simple image resample into new image
  36.  *
  37.  * @param $image Image resource
  38.  * @param $width
  39.  * @param $height
  40.  */
  41. function simpleresize($image, $width, $height)
  42. {
  43.   $new = imageCreateTrueColor($width, $height);
  44.   imagecopyresampled($new, $image, 0, 0, 0, 0, $width, $height, imagesx($image), imagesy($image));
  45.   return $new;
  46. }
  47.  
  48. $imgh = icreate($imagefile);
  49. $imgr = simpleresize($imgh, 512, 512);
  50.  
  51. header('Content-type: image/jpeg');
  52. imagejpeg($imgr);?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement