Hi,
I have two scripts i made for my sites that run fine when i run them directly (going to the url)
but when i get cron to run them they dont work.
Here is one of the scripts..
I think its the file_exist, do you need a different URL when you do it via cron?
I have two scripts i made for my sites that run fine when i run them directly (going to the url)
but when i get cron to run them they dont work.
Here is one of the scripts..
| Code: |
| <?php
include("connection.php"); $game = mysql_fetch_array(mysql_query("SELECT * FROM `games` WHERE `id` > '355' AND `status` = '0' ORDER BY `id` ASC LIMIT 1")); $imgfilename = $_SERVER["DOCUMENT_ROOT"] . "/games/flash/" . $game[id] . "/img.gif"; $flashfilename = $_SERVER["DOCUMENT_ROOT"] . "/games/flash/" . $game[id] . "/game." . $game[codebase]; if(($game[category_id] != "0") && ((file_exists($imgfilename)) && (file_exists($flashfilename))) && (($game[width] != "0") && ($game[height] != "0"))) { $date_added = date("j/n/Y"); $release_game = mysql_query("UPDATE `games` SET `status` = '1', `date_added` = '" . $date_added . "' WHERE `id` = '" . $game[id] . "'"); } ?> |
I think its the file_exist, do you need a different URL when you do it via cron?
