Turquoise Rings - Free All Ebook PDF Download - WoW Gold - Debt Consolidation - Wordpress Themes

PDA

View Full Version : More "problems"... :)


Redleg
Aug 2nd 2004, 11:41 pm
I've tried to experiment a bit with different background colors for the text banners, and switched over to text links now. (just to try that one as well).

But now it just displays text banner ads, in many different colors..
(all of the colors I've experimented with..)
But no text links..

This is how my ad_network.php file looks like:

<?php

$ad_file = 'ad_network_ads.txt';
for ($i = 0; $i <= 11; $i++) {
$p = substr ('../../../../../../../../../../', 0, $i * 3);
if (file_exists ($p . $ad_file)) {
$ad_file = $p . $ad_file;
break;
}
}

if (is_writable ($ad_file)) {
$ads = file_get_contents ($ad_file);
$ads = explode ('<ad_break>', $ads);

if (count ($ads) < 101 || $ads[0] + 3600 < time()) {
$ads[] = file_get_contents ('http://ads.digitalpoint.com/network.php?type=link');
$ads[0] = time();
if (count ($ads) > 101) unset ($ads[1]);
$file = fopen($ad_file, 'w');
fwrite ($file, implode ('<ad_break>', $ads));
fclose ($file);
$ad_network = end ($ads);
} else {
$ad_network = $ads[rand(1,count($ads))];
}
$ad_network .= '<!-- an-hl -->';
} else {
$ad_network = 'You must set the "ad_network_ads.txt" file to be writable.';
}
if (substr ($_SERVER['DOCUMENT_NAME'], -6) == '.shtml') {
ini_set ('zlib.output_compression', 0);
echo $ad_network;
}

?>

This one should display text links only, right?

Is there a cache somewhere I have to delete??

Redleg
Aug 3rd 2004, 12:17 am
Never mind, found the problem now..

You have to empty the ad_network_ads.txt file every time you change the colors or ad type...
Works fine now.

Maybe you should include that in the setup instructions??