Uz_MasteR, # Uz_MasteR (09.02.2019 / 16:18)
Salom
Phpda rasmga matn yozish metodi qanday?
Biror kishi biladimi?
<?php
//Set the Content Type
header('Content-type: image/jpeg');
// Create Image From Existing File
$jpg_image = imagecreatefromjpeg('sunset.jpg');
// Allocate A Color For The Text
$white = imagecolorallocate($jpg_image, 255, 255, 255);
// Set Path to Font File
$font_path = 'font.TTF';
// Set Text to Be Printed On Image
$text = "This is a sunset!";
// Print Text On Image
imagettftext($jpg_image, 25, 0, 75, 300, $white, $font_path, $text);
// Send Image to Browser
imagejpeg($jpg_image);
// Clear Memory
imagedestroy($jpg_image);
?><?php
// session_start();
$img = imagecreatetruecolor(100, 50);
$son = mt_rand(10000,99999);
//$harf = mt_rand();
// $_SESSION['id'] = $son;
$color = imagecolorallocate($img, 255, 255, 255);
imagettftext($img, 20, 15, 15, 10, $color, 'ARIALN.TTF', $son);
//imagestring($img, 10, 20, 15, $son, $color);
header('Content-type: image/jpeg');
imagejpeg($img);
imagedestroy($img);
?>$ch = curl_init('https://uzfor.uz/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);