According to the script that I have received, my site should be showing 5 ads, but it´s showing only one The following is the script that I´m using: <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0].' '.$ad_network[1].' '.$adnetwork[2].' '.$ad_network[3].' '.$ad_network[4]; ?> regards Roberto
You might try this: <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo implode (', ', $ad_network); ?> PHP:
Did you modify the ad_network.php file? What type of pages are you running; PHP, HTML, etc.? What is the URL?
I was using an old ad_network file. I changed for the new one and now I see no ads at all, I only see an error message that says: Parse error: parse error, unexpected T_STRING in /home/easyhome/www/www/ad_network.php on line 37 >
I haven´t edited the file, this is the script that I´m using: ad_break>', $ads); $ads_temp = explode ('|', $ads[0]); $file = fopen($ad_file, 'r+'); if (flock ($file, LOCK_EX|LOCK_NB, $would_block) && !$would_block) { if ((count ($ads) < $ads_temp[3] + 1 && $ads_temp[0] + $ads_temp[5] < time()) || $ads_temp[0] + $ads_temp[4] < time()) { $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?b=' . $_SERVER['SERVER_NAME']); if ($new_ad) { $ads_param = explode ('<ad_param>' , $new_ad); $new_ad = $ads_param[1]; unset ($ads_param[1]); $ads_temp = explode ('|', $ads_temp[0] . '|' . $ads_temp[1] . '|' . $ads_param[0]); } else { $ads_param = array_slice ($ads_temp, 2, 4); } $ads[0] = time() . '|' . gethostbyname('validate.digitalpoint.com') . '|' . implode ('|', $ads_param); if ($new_ad) { $ads[] = $new_ad; if (count ($ads) > $ads_temp[3] + 1) $ads = array_merge ((array)$ads[0], (array)array_slice ($ads, -$ads_temp[3])); } fwrite ($file, implode ('<ad_break>', $ads)); ftruncate ($file, ftell($file)); $ad_network[] = $new_ad; } flock ($file, LOCK_UN); fclose ($file); } while (count ($ad_network) < 5) { $ad_network[] = $ads[mt_rand(1,count($ads) - 1)]; } foreach ($ad_network as $key => $ad) { if ($ads_temp[1] == $_SERVER['REMOTE_ADDR'] || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) { $ad_network[$key] = str_replace ('" />', '" class="' . $ads_temp[2] . '" />', $ad); } else { $ad_network[$key] = str_replace ('" />', '">', $ad); } } } 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 end ($ad_network); } ?>
You might consider going back and uploading a fresh copy of the ad_network.php to your server. Or if nothing else, comparing the fresh copy against the file you currently have on your server.
I have already uploaded the fresh copy of the ad_network.php file to my server, and was the one that I told you before. As it doesn´t work, I have returned to the old ad_network.php file that at least shows one ad. Maybe you can help me with my footel.html file. This file has the following script: <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo $ad_network[0]; ?> is there any way to change it so it calls five time the ad_network.php file?
That's why only one (1) ad is showing. You might try this script or the one in your first post: <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo implode (', ', $ad_network); ?> PHP: