Advertisement
irokemr

news

Nov 5th, 2019
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <?php
  2.              // Creado por Jose89FCB
  3.            
  4.             define("WIDTH", 1920);
  5.             define("HEIGHT", 1080);
  6.  
  7.             $dest_image = imagecreatetruecolor(WIDTH, HEIGHT);
  8.  
  9.          
  10.             imagesavealpha($dest_image, true);
  11.  
  12.            
  13.             $trans_background = imagecolorallocatealpha($dest_image, 0, 0, 0, 127);
  14.  
  15.          
  16.             imagefill($dest_image, 0, 0, $trans_background);
  17.  
  18.            
  19.             $a = imagecreatefrompng('http://api.nitestats.com/v1/news/image.php');
  20.          
  21.              
  22.            
  23.             imagecopy($dest_image, $a, 0, 0, 0, 0, WIDTH, HEIGHT);
  24.            
  25.            
  26.             header('Content-Type: image/png');
  27.             imagepng($dest_image);
  28.  
  29.            
  30.             imagedestroy($a);
  31.            
  32.             imagedestroy($dest_image);
  33.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement