PHP Classes

File: Lou_imagem.php

Recommend this page to a friend!
  Classes of António Lourenço   PHP Nested Menu Class   Lou_imagem.php   Download  
File: Lou_imagem.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Nested Menu Class
Generate nested menu of HTML links
Author: By
Last change:
Date: 9 years ago
Size: 673 bytes
 

Contents

Class file image Download
<?php
/*
 * Lou_Menu.class
 * *Lou_imagem file
 * @author António Lourenço
 * version 1.0
 * 9/10/2014
 */
header("Content-type: image/png");
$string = $_GET['category'];
$im = imagecreatefromjpeg("img.jpg");
$fontmenu = imagecolorallocate($im, 255,255,0);
$image_height = imagesy($im);
$image_width = imagesx($im);
$font_height = imagefontheight(3);
$font_width = imagefontwidth(3);
$length = $font_width * strlen($string);
$image_center_x = ($image_width/2)-($length/2);
$image_center_y = ($image_height/2)-($font_height/2);
imagestring($im, 3, $image_center_x , $image_center_y , $string, $fontmenu);
imagepng($im);
imagedestroy($im);
?>