PHP GD Image and Cron - HELP

Befejezett Kiadva: Aug 3, 2012 Kiszállításkor fizetve
Befejezett Kiszállításkor fizetve

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

[php]<?php

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'].'" />"';

?>[/php]

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]:

[php]<?php

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

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

ImageDestroy($gif);

$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);

imagegif($gif);

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

Imagegif($gif, $image_path);

// send the new image to the browser

Imagegif($gif);

?>

[/php]

[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.

HTML PHP

Projektazonosító: #2374458

A projektről

4 ajánlat Távolról teljesíthető projekt Utoljára aktív: Aug 3, 2012

Odaítélve:

dustafo

I can help get it working right now :)

$50 USD 0 napon belül
(82 értékelés)
5.5

4 szabadúszó tett átlagosan 43$ összegű árajánlatot erre a munkára

mdjavedakhtar

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

$50 USD 1 napon belül
(25 vélemény)
5.9
codeguruz

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.

$40 USD 0 napon belül
(6 vélemény)
3.7