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.

Guidelines for rewriting ad_network.php code

Discussion in 'Co-op Advertising Network' started by digitalpoint, Dec 30, 2004.

  1. #1
    I don't care if people port the code to other languages (ASP, cold fusion, PERL or whatever else), but the code needs to work EXACTLY the same as the PHP code.

    Here's a basic checklist:

    • Always check that the ad_network_ads.txt file is writeable BEFORE a request for a new ad is made to the ad server.
    • File locking should be used when writing to the ad_network_ads.txt file.
    • Dynamic parameters that are saved at the beginning of the ad_network_ads.txt file should always be adhered to.
    • Give it a unique user agent (if something isn't working it can be traced to a specific port)
    Failure for any port to not work exactly like the PHP version will end up resulting in sites using it being blocked (at the network level) by the ad server.

    Another idea, which would make it really easy is run the ad_network.php script on the backend, and pass through the results with whatever language you need. Then you don't need to worry about the complexities of how it works and keeping it up to date.
     
    digitalpoint, Dec 30, 2004 IP
  2. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am working on a port to JSP (Java server pages), and would like to know if it is acceptable to cache the ads using other means than the ad_network_ads.txt file? I would actually like to store them in memory, since they can be retrieved faster.
     
    rgeimer, Dec 30, 2004 IP
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    You can store it in memory, but you still should write out the cache file in case the server reboots. As long as it doesn't request 400 new ads when a server reboots and it still complies with the dynamic parameters, then it's fine.
     
    digitalpoint, Dec 30, 2004 IP
  4. rgeimer

    rgeimer Guest

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the feedback. I'll add support for persistence so the ads will survive shutdown and load on startup.
     
    rgeimer, Dec 30, 2004 IP