That's the way it works, i was testing it on a non-full file but it will behave as suggested 900 seconds on a full file. Night night.
Okay Stu, problem. I can call my page that includes your new file. It works fine, it pulls the ads and rotates and starts to fill the cache file. I can do this all day long with the file that has the include, and has the simple code which is posted on this forum. (ads(0),ads(1), etc) However, when I include the file that includes this new asp file, the server CPU hits 100%. It stays that way for about 30 seconds or so and then drops back down. I'll have to do some research to find out why it does this. I have no problem with the previous original asp file.
Aren't these two things the same? Please post the code you use to display your ads and i will try and recreate the problem.
It works fine if I add the ads=adnetwork, and then pull the ads with ads(0), ads(1) on a standard .asp file. But if I put the code on a file that is already included in another main page, it fails and goes 100% cpu. Think double include. It does this both if I use include virtual, or use the asp 'server.execute' command as well. Before, I could use server.execute and get around this problem.
because the code has on error resume next in it any error or double function declaration will not stop the processing of the asp code it just moves to the next line, if the next line happens to be in a loop this will explain the 100% processing power of the server. The 30 seconds is more likely to be 20 as this is the default script timeout period. Comment out the on error resume next to find out what the error is. The only purpose of the on error resume next is to stop errors being delivered to the user if the ad server is not contactable. Stuart
Any idea why I would get a "Variable ads Undefined" error when showing ads on a subdirectory page? If I "Dim ads" then I get a Typemismatch error. Works fine on pages that are in the root folder.
My pages have "option explicit" and I had to add this to ad_network.asp : dim ad_params, ad_type, ad_file, ad_url, objFSO, objTextStreamR, AllLinks, NewTextLinks, newlink, spParam, LinksDate, ht, i, spLink, NewTextLink, objTextStreamW, attempt, r, j, adss and used this to display the ads : <% adss=ad_network response.write adss(0) & " - " & adss(1) %> Hope this works for you
Works like a charm. Thank you so much for the work you have done! I had to dim "ads" at the top of the file, btw Happy New Year!
I receive this error: Subscript out of range: '[number: 0]' /ad_network.asp, line 39 when I tried this code. I have replaced the ad_network.asp code with the new one. I've tried to keep my old ad_network_ads.txt, to flush it and to delete it but I still receive errors. Can anyone gimme an idea of what happens behind the scene? I would like to help in the development but as I said I don't have time to do it, Thanks in advance.
I have looked at line 39 and can't see what situation you would get that error. Try deleting the ad_network_ads.txt file completely.
FYI, this asp file spits out non-compliant <A HREF="...".... />...</A> HTML(note the "/" in the opening tag). I think Shawn fixed this in the php version, didn't he? -- Derek
It actually receives non compliant html from the ad server, any comments Shawn? I just did the conversion of the php script I found on this site. I can easily remove the / but this may stop the site validating properly.
Yes, I noticed that(in the txt file). I modified my copy of the script to strip out the "/"'s at the end, and it's been validating so far... -- Derek
Stupot Your port doesn't quite tally with the php version. In the if... else... statement that inserts the class parameter if digitalpoint is requesting the page the 'else' condition is used to remove the '/' from the html output. Mick
I'm not getting the code to work. It does not seem to be getting anything from the ad server. Edit: I have it working on the 2000 server, but it won't work on the nt box because of the server.CreateObject("WinHttp.WinHttpRequest.5.1") line. NT does not support this method and I have not been able to figure out how to install whatever I need to make it work. I can't use server.CreateObject("microsoft.XMLHTTP") because it does not support the timeout property. So I guess my NT site will be out for a while till I can figure out how to overcome this issue. Any body else have any suggestions?
I've done the asp version install, but my test page reports a 'permission denied' error. (http://www.audience-response-rentals.com/forum/test.asp) The ad network text file is in my '/files' folder which is the same level as '/web' and '/logs' and is where my dbases are currently located. I read and write to the dbases so technically, that should not be the issue. It's a Win2003 hosted account, and XO does not allow access to .htaccess. Any hints on troubleshooting this would be appreciated.