// List available ref banners
$SW = 2; $OUT = "";
while (list($id, $url, $alt, $count, $clks) = SQL_FETCHROW($result)) {
- $test = str_replace(URL, PATH, $url); $size = 0;
+ $test = str_replace(URL, constant('PATH'), $url); $size = 0;
if ($test == $url) {
// Download banner (I hope you keep the banner on same server???)
- $fp = GET_URL($url); $file = "";
+ $fp = GET_URL($url); $bannerContent = "";
if ((!empty($fp)) && (is_array($fp)) && (count($fp) > 0) {
// Loads only found banner, when there is a 404 error this foreach() command
// will cause an "Invalid argument supplied for foreach()" error
foreach ($fp as $f) {
- $file .= $f;
+ $bannerContent .= $f;
}
}
- $size = strlen($file);
+ $size = strlen($bannerContent);
} elseif (FILE_READABLE($test)) {
$size = filesize($test);
}