Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Creado por Jose89FCB
- $page= file_get_contents("https://fnitemshop.000webhostapp.com/shop.php");
- $imagen1 = explode ('"full_background":"', $page);
- $imagen2 = explode ('"', $imagen1[1]);
- $imagefile = $imagen2[0];
- /**
- * Opens new image
- *
- * @param $filename
- */
- function icreate($filename)
- {
- $isize = getimagesize($filename);
- if ($isize['mime']=='image/jpeg')
- return imagecreatefromjpeg($filename);
- elseif ($isize['mime']=='image/png')
- return imagecreatefrompng($filename);
- /* Add as many formats as you can */
- }
- /**
- * Simple image resample into new image
- *
- * @param $image Image resource
- * @param $width
- * @param $height
- */
- function simpleresize($image, $width, $height)
- {
- $new = imageCreateTrueColor($width, $height);
- imagecopyresampled($new, $image, 0, 0, 0, 0, $width, $height, imagesx($image), imagesy($image));
- return $new;
- }
- $imgh = icreate($imagefile);
- $imgr = simpleresize($imgh, 512, 512);
- header('Content-type: image/jpeg');
- imagejpeg($imgr);?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement