trying to integrate this on one of my sites, but it's soooo slow loading that's i had to yank it. here is is on a pae with nothing besides the ad... http://www.chella.com/testing.php i mean... it's bad. any idea what could be wrong? i created 1 account, posted the ads and got it working. the created by referral this new account, i have no idea what's the issue
Is the new account using the same physical server that your account that was working faster? Assuming you are using the cache file properly, it should be pretty much instant (which obviously it's not)?
differernt server, same hosting company, same datacenter. i host all my clients on the same server, except this one client, which has their own reseller account on a differernt server.
surely it's the server, i tried a differernt domain on that server and get the same exact problem. any idea what i can mention to the host's support team?
struggling with this, when i remove it, all is well... the file is writable, it works... it just takes 10 seconds to work. 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?color=ffffff'); $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; } Code (markup):
Not sure... I guess you could take parts of it out slowly until you find the part that is causing it to slow down, then debug it from there.
support wrote this back.... I bet this line is the problem: $ads[] = file_get_contents ('[url="http://ads.digitalpoint.com/network.php?color=ffffff');"][color=#0000ff]http://ads.digitalpoint.com/network.php?color=ffffff');[/color][/url] Please try to replace the remote connection with an actual file on the server, just for testing and I bet you will receive a similar performance as on the server that works fine for you. Code (markup):
Which php version are you using ? I believe there were problems with that syntax in older versions of php