PHP GD Image and Cron - HELP

I've been tearing my hair out with this >:( I want to generate dynamic forum images using this script:


if($connect==true){$online=$serverdetails['players'] . ' / '.$serverdetails['max_players'].' players' ; } else { $online='offline'; }

echo '<img src="[url removed, login to view]'.$row['servername'].'&votes='.$row['lastmonthvotes'].'&id='.$row['id'].'&ip='.$row['ip'].'&online='.$online.'&rank='.$row['position'].'" />"';


This script is what generates the images (I've included the entire script in case I flipped something up elsewhere). Here is [url removed, login to view]:


header( "Content-type: image/gif" );

// destroy the image in memory to free up server resources


$servername = $_GET['name'];

$rank = $_GET['rank'];

$ip = $_GET['ip'];

$id = $_GET['id'];

$online = $_GET['online'];

$votes = $_GET['votes'];

$image_path = "/var/www/html/serverfinder/img/server_".$id.".gif";

$gif = imagecreatefromgif('/var/www/html/serverfinder/img/[url removed, login to view]');

$yellow = imagecolorallocate($gif, 255, 255, 0);

$white = imagecolorallocate($gif, 255, 255, 255);

$font = '/var/www/html/serverfinder/[url removed, login to view]';

$initialX = '15';

$initialY = '25';

$increaseY = '8';

$fontSize = '14';

$fontRotation = '0';

$fontSizeSmall = '9';

$firstline = $servername;

$secondline = $ip . ' - ' . $online;

$thirdline = 'ranked #' . $rank . ' with ' . $votes . ' votes';

//imagestring($gif, $font, $px, 20, $string, $black);

imagettftext($gif, $fontSize, $fontRotation, $initialX, $initialY, $white, $font, $firstline);

imagettftext($gif, $fontSizeSmall, $fontRotation, $initialX, $initialY+$increaseY+$increaseY, $yellow, $font, $secondline);

imagettftext($gif, $fontSizeSmall, $fontRotation, $initialX, $initialY+$increaseY+$increaseY+$increaseY+$increaseY, $yellow, $font, $thirdline);


// now save a copy of the new image to the cache directory

Imagegif($gif, $image_path);

// send the new image to the browser




[url removed, login to view] is supposed to save the new banners to the /img directory. Now this works perfectly when I manually got to [url removed, login to view] (after about 30 seconds of loading) but does not work when I cron it. Whenever I cron, I get the correct out put, but it doesn't write to the directory. It just spits out code.

Any ideas? I really have no idea :( I need this done TODAY, will hire you if you have a reasonable price.

Compétences : HTML, PHP

en voir plus : php dynamic image cron, php image cron, white and case, type free online write what you want, true hire, string banners, php string to html, php server with html free, php is, php forum script, name banner ideas, hire resources, hire online help, hire image, forum php html, dynamic cache, write php online, loading gif, hire php help, hire help online, GD, dynamic connect, save html image, html header banner, html img

Concernant l'employeur :
( 16 commentaires ) Victoria, Canada

Nº du projet : #2374458

Décerné à:


I can help get it working right now :)

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 0 jours
(82 Commentaires)

4 freelance font une offre moyenne de $43 pour ce travail


hi we have 7+ years of exp in php please check pmb

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(25 Commentaires)

Hi There, I got it what's wrong going on there, will tell you also how to solve it and I'll resolve it immediately.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(6 Commentaires)

Hello , I had checked your job description posted for this job and is fully confident as I am having 5 yrs of job experience in PHP / MYSQL / CSS / HTML and worked on similar type of job in past also. I have work Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)