Login   Register  
PHP Classes
elePHPant
Icontem

File: counter_img.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jon Pulice  >  JPCounterClass  >  counter_img.php  >  Download  
File: counter_img.php
Role: Auxiliary script
Content type: text/plain
Description: Counter Image File
Class: JPCounterClass
Count the accesses to a site using MySQL tables
Author: By
Last change: minor change
Date: 9 years ago
Size: 517 bytes
 

Contents

Class file image Download
<?php

$in 
$_GET['data'];
$in base64_decode($in);

$ar explode(":"$in);

$ar['col'] = $ar[0];
$ar['num'] = $ar[1];
$ar['fil'] = $ar[2];

Header("Content-type: image/png");
$im ImageCreateFromPNG("./images/{$ar['fil']}");
$blue ImageColorAllocate($im00100);

$font "verdana.ttf";

$txtw ImageFontWidth($font) * strlen($ar['num']);
$x 50 - ($txtw 2);

//add the number
ImageTTFText($im140$x24$blue$font$ar['num']);

ImagePNG($im);
ImageDestroy($im);

?>