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.

ad_network PHP File Update

Discussion in 'Co-op Advertising Network' started by digitalpoint, Mar 31, 2005.

  1. samm27

    samm27 Peon

    Messages:
    121
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #121
    Thanks everyone for the helpful comments!

    I use Frontpage for my pages so, after changing the PHP file and adding the txt file, I simply did a search and replace for the new code and it all went smoothly!

    [For the guy who added code to all the pages manually, I did a search form <\body> and then replaced it with the code and then appended <\body> - so it ends up at the end of every page!]


    I do have a question: I have only about 2K points but I have been running my links for at least 10 days and I still have seen no sign of any links anywhere. My ads are enabled but when I check Google and yahoo for my website www-younevercall-com I cannot find a single link from the co-op.

    Anyone have an idea why I would find zero links in Google or Yahoo?

    thanks,
    sam.
     
    samm27, Apr 5, 2005 IP
  2. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #122
    Log into your account and click on "Stats" under each ad. This will give you actual impressions (number of times your ad was shown).

    This will become more and more accurate over the coming days as everyone updates their code.
     
    yfs1, Apr 5, 2005 IP
  3. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #123
    Shawn,
    I appreciate the work you do much. With this update I only have 2 problems:

    a) the interface changed again, so I have to recode the ad display from using the array elements on several site's footer... oh - well - chaning interfaces again ... this is software development - back & forth...

    b) more important: the tracking feature - as cool as it is - makes it possible that every jerk able to load html source detect the coop ad network... most important - spiders can rely on one single string and detect them just as they can do with affiliate links etc...

    What are your thoughts on making a supported silent option?
     
    kewler, Apr 5, 2005 IP
  4. deanerick

    deanerick Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #124
    shawn,

    i agree with linda, that if you have more than 10 sites this is a hugh task. If you use the text feature and 5 sites showing, this is NOT just a one line replace in your page, it is a HUGH task.....

    like linda said, why not allow the old version to work side by side. i dont see any need to look at stats myself....

    thanks,

    dean
     
    deanerick, Apr 5, 2005 IP
  5. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #125
    Because then the stats would never be accurate then for those of us that do want them.
     
    yfs1, Apr 5, 2005 IP
  6. Perrow

    Perrow Well-Known Member

    Messages:
    1,306
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    140
    #126
    Finally I have devised a test of the text files writability. This version checks to see that some data was written to the textfile. And should do all other things the php script version 2.13 does.

    Added a little "manual" below:

    This script will replace the old ad_network.asp. It will try to create the file ad_network_ads_213.txt file, if this does not succede creating that file it will display a message instead of the ads. If you get that message, create the file manually and ensure that the script has write access to that file (if it doesn't it will again print a message instead of the ads).

    The code will now print the ads just by calling the

    ad_network

    function. There is no longer any need to call

    response.write ads(0)
    or
    <%=ads(0) %>

    or similar. You can change the delimiter and the number of ads using constants (in the first rows of the file). There is also a constant to change the text files name (if you decide to use the same name as before, delete the old file when installing the new script).
     

    Attached Files:

    Perrow, Apr 5, 2005 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #127
    Well, the tracking image is only displayed to end-users that can actually use it (based on their user agent). No point in wasting bandwidth for requests that can't do anything with it anyway (wget, curl, etc.).
     
    digitalpoint, Apr 5, 2005 IP
  8. samm27

    samm27 Peon

    Messages:
    121
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #128
    Blademaster - stats are blank.

    I think its not working at all. :(
     
    samm27, Apr 5, 2005 IP
  9. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #129
    Our sites are slowly but surely not validating. We are using a cgi wrapper on the sites that are failing and most of them are higher traffic. Here is what we just received when updating to the latest code release:

    Y | o | u | | m


    Assuming it is trying to tell me something, just not sure what it is :)

    Also, it would be great to have a sticky update file that only Shawn can write to to let everyone know what update we are at and when it is necessary to update by.
     
    chachi, Apr 6, 2005 IP
  10. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #130
    Isn't that what this sticky if for? :)

    Looks like you are using $ad_network[x] somewhere in your setup to output ads instead of plain old $ad_network
     
    digitalpoint, Apr 6, 2005 IP
  11. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #131
    heh, I was hoping so. But, 13 pages seems like a lot to read through to try and find your posts about what needs to be done and by when. :)
     
    chachi, Apr 6, 2005 IP
  12. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #132
    Check the first post. :)
     
    digitalpoint, Apr 6, 2005 IP
  13. chachi

    chachi The other Jason

    Messages:
    1,600
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    0
    #133
    First post? What would I want to read that for? :)
     
    chachi, Apr 6, 2005 IP
  14. Perrow

    Perrow Well-Known Member

    Messages:
    1,306
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    140
    #134
    This one does a few things a little nicer than previous versions.

    The generation of random ads failed for me sometimes with the last script. It produced doubles of some ads. Otherwise it's used in the same way.

    Also, for the first time since I began updating the file it has become smaller which feels nice :)
     

    Attached Files:

    Perrow, Apr 6, 2005 IP
  15. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #135
    Has anyone made the ASP version check if the local cache file is actually writeable before making a request to the ad server? That's what is causing most people to get their ASP sites blocked by the ad server.
     
    digitalpoint, Apr 6, 2005 IP
  16. Cartman

    Cartman Active Member

    Messages:
    354
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    88
    #136
    Can you increase the size of the Separate Ads With: field? I have my ads broken up with the following code:

    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo '<li>';echo $ad_network[0]; echo '</li><li>'; 
    	include ('ad_network.php');
    	echo $ad_network[1]; echo '</li><li>';
    	include ('ad_network.php');
    	echo $ad_network[2]; echo '</li><li>';
    	include ('ad_network.php');
    	echo $ad_network[3]; echo '</li><li>';
    	include ('ad_network.php');
    	echo $ad_network[4]; echo '</li>';
    
    ?>
    PHP:
    And I can't do that with the new code..
     
    Cartman, Apr 6, 2005 IP
  17. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #137
    Oops... :) Fixed.
     
    digitalpoint, Apr 6, 2005 IP
  18. Cartman

    Cartman Active Member

    Messages:
    354
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    88
    #138
    Works like a charm, thanks Shawn!
     
    Cartman, Apr 6, 2005 IP
  19. Perrow

    Perrow Well-Known Member

    Messages:
    1,306
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    140
    #139
    Yes, finally the script actually checks the writability of the cache file. Finding the correct way of doing this meant that some more code could be removed, so now the script is nice and small.

    I will continue to improve the code for preformance and utility.
     

    Attached Files:

    Perrow, Apr 7, 2005 IP
  20. Homer

    Homer Spirit Walker

    Messages:
    2,396
    Likes Received:
    150
    Best Answers:
    0
    Trophy Points:
    0
    #140
    I am currently updating my domains with new CO OP code. I have done 2 already...no problems. I am work on one now, www . cardtemplates . com and keep getting 'You must set the ad network .txt file to be writable'

    I have set permissions properly, but on this domain I can't figure out what I'm doing wrong :confused: Any words of wisdom would be appreciated :eek:
     
    Homer, Apr 7, 2005 IP