kaptain
Sep 3rd 2004, 8:05 am
i have two accounts working great!
i just added my third site to the network and for some reason it won't show ads and it wont validate.
*this is the first site i have in the network that utilizes "SSI"
but my pages are htm and html
my .htaccess file looks like:
AddType text/html .shtml
AddHandler server-parsed .html .htm
Options Indexes FollowSymLinks Includes
this allows my .htm and .html pages to be parsed like .shtml
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;
}
?>
and the properties are set at rw-rw-r--
i am using the <!--#include virtual="/ad_network.php" --> in my .htm pages
i do have ads writing to my ad_network_ads.txt file but nothing shows on site pages
i have four ads set up in this account so far...all pending review and enabled
Any help would be appreciated!:)
i just added my third site to the network and for some reason it won't show ads and it wont validate.
*this is the first site i have in the network that utilizes "SSI"
but my pages are htm and html
my .htaccess file looks like:
AddType text/html .shtml
AddHandler server-parsed .html .htm
Options Indexes FollowSymLinks Includes
this allows my .htm and .html pages to be parsed like .shtml
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;
}
?>
and the properties are set at rw-rw-r--
i am using the <!--#include virtual="/ad_network.php" --> in my .htm pages
i do have ads writing to my ad_network_ads.txt file but nothing shows on site pages
i have four ads set up in this account so far...all pending review and enabled
Any help would be appreciated!:)