Advertisement
johnburn

Untitled

Mar 22nd, 2011
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.37 KB | None | 0 0
  1. <?php
  2. $id = $_GET['id'];
  3. require("dmn.php");
  4. $link = connect_db();
  5.  
  6. $pn = @mysql_query ("Select img from `users` where `id` = '$id';");
  7. $patn = @mysql_fetch_array ($pn);
  8. $url = $patn["img"];
  9.  
  10. $array=explode(".", $url);
  11. $type=$array[1];
  12.  
  13. $par = GetImageSize($url);
  14. $olcu1 = $par[0] - 280;
  15. $olcu2 = $par[1] - 8;
  16. $olcu3 = 5;
  17.  
  18. $font = "fonts/6.ttf"; // Font dosyas? ve yolunu tan?ml?yoruz
  19.  
  20. if(strtolower($type)=="jpg")
  21. {
  22. $im = @imagecreatefromjpeg ($url);
  23. $white = imagecolorallocate($im, 255, 255, 0);
  24. $red = imagecolorallocate($im, 255, 0, 0);
  25. $text = "OMURUM.BIZ";
  26. imagettftext($im, 30, 0, $olcu1, $olcu2, $white, $font, $text);
  27. header ('Content-type: image/jpeg');
  28. imagejpeg($im);
  29. imagedestroy($destroy);
  30. }
  31.  
  32.  
  33.  
  34.  if(strtolower($type)=="gif")
  35. {
  36. $im = @imagecreatefromgif ($url);
  37. $white = imagecolorallocate($im, 255, 255, 0);
  38. $red = imagecolorallocate($im, 255, 0, 0);
  39. $text = "OMURUM.BIZ";
  40. imagettftext($im, 30, 0, $olcu1, $olcu2, $white, $font, $text);
  41. header ('Content-type: image/gif');
  42. imagegif($im);
  43. imagedestroy($im);
  44. }
  45.  
  46.  
  47.  if(strtolower($type)=="png")
  48. {
  49. $im = @imagecreatefrompng ($url);
  50. $white = imagecolorallocate($im, 255, 255, 0);
  51. $red = imagecolorallocate($im, 255, 0, 0);
  52. $text = "OMURUM.BIZ";
  53. imagettftext($im, 30, 0, $olcu1, $olcu2, $white, $font, $text);
  54. header ('Content-type: image/png');
  55. imagepng($im);
  56. imagedestroy($im);
  57. }
  58.  
  59.  
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement