I have few ASP sites and they are well indexed on Google. Recently our servers got slowed down and all ASP sites with Coop started giving problem. So I had to remove them from the site. Since I am a new coop user I didnt understand what to do so as a safe bet we decided to remove the code. I would like to again add the sites to the network. But I am not able to get it work. I am getting the following error: msxml3.dll error '800c0005' The system cannot locate the resource specified. /ad_network.asp, line 155 But this link is opening fine on my local PC but not opening on the Remote Server. Server IP is: 67.18.159.226 Please assist. Regards,
Hi, Everyone saying that ASP versions works but it is not working on my server. So just wanted to know if my server got blocked for making too many requests. Regards, Vijay
Ive been having ASP issues also. One min its working, the next its not. Its always working fine on my server at home but all of the problems have been with a dedicated server we have for a web server. I don't know why it does it, I am now thinking it may be a firewall issue or something because I recently discovered that when the ASP websites lag down to 20 second load times, its actually unable to pull any ads, so a connection is not being made. I didnt notice before because it was still displaying the ads that were in the .txt file, but recently I deleted all of those files and noticed that it was never adding any new ones. I really wish someone would come up with an actual solution because I am missing out on about 75K of weight right now.
It depends upon how is the ms xml library installed on the server. You should contact the server admin and ask for it or provide more infos here to see if I may help
Shawn, Would I be able to help you write an official ASP version of the code? I also want to ad the co-op to my sites but ASP is definitely the only way I can do it. I'd be more than happy to develop and help maintain the ASP code as you make PHP updates. Let me know. I really think it would help the co-op out quite a bit. There are a ton of people requesting ASP support, along with myself! Looking forward to hear your response. -- The other Shawn.
I just set up an asp version for a mate of mine...post or send me the file (ad_network.asp) you are using and I'll see what I can do. I had errors at first but changed something in ad_network.asp and now no problems...
Hi elkiwi. If you could send me your asp version it would be great. mdp@centermail.net thanks, Markus
Elkiwi, iTISTIC Our site www.dealgain.com is an ASP site. we are using the ASP vesion attached with this post. Our site has PR 3 and 110K pages in Google. when I validate, I get a weight =7. Please help us in fixing the code Thanks in advance Jag
I've tried this but it's not working. I get the following ad (b.t.w. you get this ad as well on your own site dealgain.com). I've changed the code a bit but the problem is getting the valid ads.
I started working on an ASP version a few months ago but never finished. I have since left my full-time job and am working for myself and have regained some sense of a life back. Working full-time and running your own company at the same time will put a hurtin on any time available to work on projects for "fun". In any case, I'm going to pull out my code and try and finish it up in the next few days or so. I'll post here when I'm through.
here's mine which works: ad_network.asp <% dim ad_params, ad_objFSO 'Set num_ads to the number of ads you want to display. 'Set ad_separator to the separator you want between ads. const num_ads = 4 const ad_separator = " | " const ad_file_name = "ad_network_ads_###.txt" Function ad_network() Const root_path="\" 'the (writable) path to ad_network_ads.txt dim ad_ids() dim ad_type, ad_url, ad_file, AllLinks, NewTextLinks, objTextStreamR, objTextStreamW, newlink, spParam, LinksDate, i, NewTextLink, attempt, r, j dim stream, displayAds(), fileWritable Randomize() on error resume next ad_type = "link" '"link" for text link | "text" for text banner | "" (empty) for graphical banner ad_url = "http://ads.digitalpoint.com/network.php?c=" & Request.ServerVariables("SERVER_NAME") & "&type=" & ad_type ad_file = Server.MapPath("/") & root_path & ad_file_name 'it must be a path with write privileges Set ad_objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objTextStreamR = ad_objFSO.OpenTextFile(ad_file,1,true) 'Is the file writable? set fileWritable = ad_objFSO.GetFile(ad_file) if (fileWritable.Attributes and 1) = 1 then Response.Write "You must set the ad network .txt file to be writable." exit function end if 'If the file contains no data then set up for new file if objTextStreamR.AtEndOfStream then redim AllLinks(1) else 'else split existing data AllLinks = split(objTextStreamR.ReadAll,"<ad_break>") end if 'If no timestamp in first record, get new ad_param data if instr(1,AllLinks(0),"|",vbTextCompare) = 0 then newlink = GetNewLink(ad_url) spParam = split(ad_params,"|",-1,vbTextCompare) spParam(0) = AllLinks(0) AllLinks(0) = ad_params AllLinks(Ubound(AllLinks)) = newlink SaveFile join(AllLinks, "<ad_break>"), ad_file else spParam = split(AllLinks(0),"|",-1,vbTextCompare) end if if IsDate(spParam(0)) then LinksDate = cdate(spParam(0)) else LinksDate = Now() end if If (UBound(AllLinks) <= spParam(3) + 1 and clng(datediff("s",LinksDate,now())) > clng(spParam(5))) or clng(datediff("s",LinksDate,now())) > clng(spParam(4)) Then NewTextLink = GetNewLink(ad_url) if NewTextLink <> "" then redim preserve AllLinks(UBound(AllLinks) + 1) AllLinks(0) = ad_params AllLinks(ubound(AllLinks)) = NewTextLink end if If ubound(AllLinks) > spParam(3) then for i = 1 to spParam(3) AllLinks(i) = AllLinks(i + 1) next redim preserve AllLinks(spParam(3)) End If AllLinks(0) = Now() & mid(AllLinks(0),instr(1,AllLinks(0),"|",vbTextCompare)) SaveFile join(AllLinks, "<ad_break>"), ad_file End If 'get 5 random non-duplicate ads dim id_string, c_safety, temp_ad redim preserve displayAds(num_ads - 1) redim preserve ad_ids(num_ads - 1) c_safety = 0 id_string = "-" i = 0 do while i < num_ads and i < UBound(AllLinks) and c_safety < 100 r = int(Rnd() * (UBound(AllLinks)) + 1) temp_ad = split(AllLinks(r), "<id>") 'If this ad has NOT been selected before its id will NOT be in id_string. 'When searching for id add a "-"'s to make sure we do not match partial numbers. if not instr(1, id_string, "-" & temp_ad(1) & "-") > 0 then id_string = id_string & temp_ad(1) & "-" if Request.ServerVariables("REMOTE_ADDR") = spParam(1) or Request.ServerVariables("SERVER_ADDR") = Request.ServerVariables("REMOTE_ADDR") then displayAds(i) = Replace(temp_ad(0),""" />",""" class=""" & spParam(2) & """ />") else displayAds(i) = temp_ad(0) end if displayAds(i) = Replace(displayAds(i),"<a","<a class='adnetwork'") i = i + 1 end if c_safety = c_safety + 1 loop 'Remove trailing "-" from id_string if len(id_string) > 0 then id_string = left(id_string, len(id_string) - 1) dim printAds printAds = join(displayAds, ad_separator & vbcrlf) Response.Write "<img src=""http://ads.digitalpoint.com/t" & id_string & ".gif"" width=""1"" height=""1"">" ad_network = displayAds 'Print yourself 'Response.Write printAds 'Print all at once end function '------------------------------------------------ ' Private functions '------------------------------------------------ Private Function SaveFile(strDataToSave, strFileName) dim stream Application.Lock 'prevents other processes from changing file while writing set stream = ad_objFSO.opentextfile(strFileName,2,true) stream.write strDataToSave stream.close Application.UnLock end function Private Function GetHTTPText(File) if Application("LastCommsAttempt") = "" then Application("LastCommsAttempt") = now else if datediff("s",Application("LastCommsAttempt"),now()) > 4 then Application("LastCommsAttempt") = now else exit function end if end if 'on error resume next Dim wHTTP 'Set wHTTP = server.CreateObject("Microsoft.XMLHTTP") Set wHTTP = server.CreateObject("Msxml2.ServerXMLHTTP.3.0") 'whttp.settimeouts 2000,30000,30000,30000 wHTTP.Open "GET", File, false wHTTP.Send 'If wHTTP.WaitForResponse(5) = True Then GetHTTPText = wHTTP.ResponseText 'End If Set wHTTP=nothing end function Private Function GetNewLink(File) dim ht, spLink ht = GetHTTPText(File) if ht <> "" then if instr(1,ht,"<ad_param>",vbTextCompare) > 0 then spLink = split(ht,"<ad_param>",-1,vbTextCompare) ad_params = now() & "|216.9.35.51|" & spLink(0) GetNewLink = spLink(1) else Application("LastCommsAttempt") = dateadd("s",100,now) ad_params = now() & "|216.9.35.51|abcdefgh|400|900|4" end if else if datediff("s",Application("LastCommsAttempt"),now()) > 5 then Application("LastCommsAttempt") = dateadd("s",100,now) end if ad_params = now() & "|216.9.35.51|abcdefgh|400|900|4" end if end function %> Code (markup): Then my footer looks like this: (strip out css and divs) <!-- #INCLUDE virtual=ad_network.asp --> <div class="adnetwork"> Link Partners:<br> <% dim ads ads=ad_network response.write ads(0) & " | " & ads(1) & " | " & ads(2) & " | " & ads(3) %> </div> Code (markup): You'll need to upload the ad_network_ads_###.txt file replace the ### with a number and point to it from the ad_network.asp Elkiwi