1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

AdNetwork ASP Code

Discussion in 'Co-op Advertising Network' started by Cyber-SEO, Dec 28, 2004.

  1. #1
    Does anyone have the most up to date ASP code for the AdNetwork? I have some code that I used a little while back and got it banned :D finally today that ban was taken off.
    SEMrush
     
    Cyber-SEO, Dec 28, 2004 IP
    SEMrush
  2. mopacfan

    mopacfan Peon

    Messages:
    3,276
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just do a search for the asp version.
     
    mopacfan, Dec 28, 2004 IP
  3. Cyber-SEO

    Cyber-SEO Member

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    I have one ASP version that may not be the best one, after searching around it looks like there is only one version out there.

    I'll try to write one and will post it here.
     
    Cyber-SEO, Dec 29, 2004 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    If you plan on making your own version, make SURE it does everything the PHP version does exactly the same. Makes sure you take into account things like file locking of the cache file, checking if it's writable BEFORE contacting the ad server, using the dynamic parameters properly, etc.
     
    digitalpoint, Dec 29, 2004 IP
  5. Zinho

    Zinho Peon

    Messages:
    284
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've attached the latest version.

    Look for my previous posts for instructions
     
    Zinho, Dec 29, 2004 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    That version is outdated compared to the latest ad_network.php file BTW.
     
    digitalpoint, Dec 29, 2004 IP
  7. Zinho

    Zinho Peon

    Messages:
    284
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Currently I have no time to update it...if anyone wrote an update please let me know, thanks
     
    Zinho, Dec 29, 2004 IP
  8. Cyber-SEO

    Cyber-SEO Member

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #8
    I'll try to update that version some time today and will post it.
     
    Cyber-SEO, Dec 29, 2004 IP
  9. vorapolpanya

    vorapolpanya Peon

    Messages:
    82
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    looking forward to the update! :)
     
    vorapolpanya, Dec 29, 2004 IP
  10. wrkalot

    wrkalot Peon

    Messages:
    285
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Word is, that if the .ASP version doesn't get updated all .ASP sites will fail validation soon. *waiting with fingers crossed*
     
    wrkalot, Dec 30, 2004 IP
  11. TheBroker

    TheBroker Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Is there a post that explains the exact changes to the new php code so someone here good with asp can update the asp version?

    Id be happy to try if I knew what was changed and what functions require updating.
     
    TheBroker, Dec 30, 2004 IP
  12. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #12
    The old ASP code was not right to begin with, so is someone wants to do it right, it probably needs to be done from scratch.
     
    digitalpoint, Dec 30, 2004 IP
  13. TheBroker

    TheBroker Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Okay, is there any reference anywhere here that breaks down the functions of the current php code or do I have to do a crash course in php to mock the current code.

    Forget it, looks like Stupot has an update, Ill wait for that. Thanks!
     
    TheBroker, Dec 30, 2004 IP
  14. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #14
    ASP isn't my specialty, so I could be wrong, but a few things that might need to be fixed...

    • Initial creation of the first ad should not make 5 requests to the ad server.
    • Needs some sort of file locking mechanism when writing the file out, otherwise you are going to have problems on very high load sites.
    • Cache file should save even if there is no ad (possibly ad server is down), this forces it to wait for the timeout before trying again for a new ad.
    • Shouldn't there be a SaveFile() call after the GetNewLink(ad_url) call? (There is only after the first one.)

    One thing you want to be sure and check is how it acts if the ad server is not available. Test it by making it ads1.digitalpoint.com for example. Make sure the ad_network_ads.txt file is still written out (basically updating the timestamp) and that the params aren't nullified.
     
    digitalpoint, Dec 30, 2004 IP
  15. stupot

    stupot Peon

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I have addressed all the above except for the file locking, what problems have you had with this? There is a line of code at the top which tells the script to continue if it hits any errors, this should just ignore any locking problems. The SaveFile() call is only used on the initial creation of the txt file.
     
    stupot, Dec 30, 2004 IP
  16. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #16
    The file locking will come into play with a very high load site... if it tries to write out the file at the same time by two different processes. Essentially they collide and you end up with an empty ad_network_ads.txt file. Normally it's not an issue because most sites don't get enough traffic to worry about a process overlapping that takes a couple milliseconds, but believe it or not, it was an issue with a couple sites already (originally I had no file locking), so that's why it was added.
     
    digitalpoint, Dec 30, 2004 IP
  17. stupot

    stupot Peon

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Added File Locking Code to file write operations. Fingers Crossed all ok now.
     
    stupot, Dec 30, 2004 IP
    dkalweit likes this.
  18. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #18
    Make sure you test it to see what happens to the ad_network_ads.txt file if the ad server is unavailable (change it to a bad address or something). Make sure the timestamp updates and the parameters are not wiped.
     
    digitalpoint, Dec 30, 2004 IP
  19. stupot

    stupot Peon

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Done (min 4 seconds between retries), and it also caters for if someone has an old style or no txt file and the server isn't available it puts in default values NOW|216.9.35.51|abcdefgh|400|900|4. Going for some zzzz's 2 am here, any 'features' that shouldn't be there please reply here and i will fix tomorrow.
     
    stupot, Dec 30, 2004 IP
  20. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    37,999
    Likes Received:
    2,567
    Best Answers:
    453
    Trophy Points:
    710
    Digital Goods:
    29
    #20
    It should wait the normal 15 minutes (900 seconds) for another try... at least if the ad_network_ads.txt file already had 400 ads. If it's not full, then the 4 seconds would be right.
     
    digitalpoint, Dec 30, 2004 IP