Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php create an image

<?php
header("Content-Type: image/png");//change the php file to an image
$im = @imagecreate(110, 20)
    or die("Cannot Initialize new GD image stream");//creates an image with the resolution x:110 y:20 
$background_color = imagecolorallocate($im, 0, 0, 0);//create an color with RGB
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);//draws text to the image with the font:1 xpos:5 ypos:5 
imagepng($im);//sends the image data to the user
imagedestroy($im);//destroys the image from the server
?>
Comment

PREVIOUS NEXT
Code Example
Php :: get words after string in in php 
Php :: laravel count by date 
Php :: upgrade php linux 
Php :: convert multidimensional array to single array php 
Php :: sum of columns laravel eloquent 
Php :: php shell command execution 
Php :: deactivate auto update wordpress plugins 
Php :: laravel old value or default 
Php :: php in html attributes 
Php :: laravel query select from table where id != to another table id 
Php :: laravel create seeder 
Php :: wordpress max post revision 
Php :: set timezone in php 
Php :: php json request get value of an array element 
Php :: laravel set config value dynamically 
Php :: yii2 postgresql connection 
Php :: laravel image ratio validation 
Php :: laravel db query 
Php :: get array key based on value php 
Php :: laravel update by id 
Php :: file put contents append 
Php :: cloudflare country 
Php :: Notice: Trying to access array offset on value of type int in /var/www/pdam/modules/phpexcel/PHPExcel/Cell/DefaultValueBinder.php on line 82 
Php :: PHP scandir() Function 
Php :: laravel image validate 
Php :: get app url in laravel 
Php :: if i am using $_SERVER it shows 500 error 
Php :: print array on php 
Php :: import facade URL laravel 
Php :: javascript date to php date 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =