Guest User

Untitled

a guest
Jun 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2.   //Set the Content Type
  3.   header('Content-type: image/jpeg');
  4.  
  5.   // Create Image From Existing File
  6.   //$pull_image = $_POST["imgurl"]);
  7.  
  8.   $jpg_image = imagecreatefromjpeg('/meme/ss.jpg);
  9.  
  10.  // Allocate A Color For The Text
  11.  $white = imagecolorallocate($jpg_image, 255, 255, 255);
  12.  
  13.  // Set Path to Font File
  14.  $font_path = "impact.ttf";
  15.  
  16.  // Set Text to Be Printed On Image
  17.  $text = "Test Text";
  18.  
  19.  // Print Text On Image
  20.  imagettftext($jpg_image, 25, 0, 75, 300, $white, $font_path, $text);
  21.  
  22.  // Send Image to Browser
  23.  imagejpeg($jpg_image);
  24.  
  25.  // Clear Memory
  26.  imagedestroy($jpg_image);
  27. ?>
Add Comment
Please, Sign In to add comment