header( 'Expires: ' . gmdate('D, d M Y H:i:s', time() + 60));
<?php
include("jobs_config.php");
mysql_connect($DBHost,$DBUser,$DBPass);
mysql_select_db($DBName);
$strQuery="
SELECT count(".$DBprefix."ext_postings.id) as totaljobs, count( DISTINCT ".$DBprefix."ext_postings.employer) as totalemployers FROM ".$DBprefix."ext_employers , ".$DBprefix."ext_postings
WHERE
".$DBprefix."ext_postings.employer = ".$DBprefix."ext_employers.username
AND expires>".time()." AND ".$DBprefix."ext_postings.active='YES'";
$result=mysql_query($strQuery);
$row=mysql_fetch_assoc($result);
$image_text = $row['totaljobs']." jobs from ".$row['totalemployers']." companies";
Header ("Content-type: image/png");
$img_handle = imageCreateFromPNG("images/toptrans2.PNG");
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
ImageString ($img_handle, 3, 10, 9, $image_text, $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
<?php
include("jobs_config.php");
mysql_connect($DBHost,$DBUser,$DBPass);
mysql_select_db($DBName);
$strQuery="
SELECT count(".$DBprefix."ext_postings.id) as totaljobs, count( DISTINCT ".$DBprefix."ext_postings.employer) as totalemployers FROM ".$DBprefix."ext_employers , ".$DBprefix."ext_postings
WHERE
".$DBprefix."ext_postings.employer = ".$DBprefix."ext_employers.username
AND expires>".time()." AND ".$DBprefix."ext_postings.active='YES'";
$result=mysql_query($strQuery);
$row=mysql_fetch_assoc($result);
$image_text = $row['totaljobs']." jobs from ".$row['totalemployers']." companies";
Header ("Content-type: image/png");
header( 'Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600));
$img_handle = imageCreateFromPNG("images/toptrans2.PNG");
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
ImageString ($img_handle, 3, 10, 9, $image_text, $color);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>