No class?

Discussion in 'Co-op Advertising Network' started by kewler, Jan 3, 2005.

  1. #1
    Hi Shawn,

    I just noticed the new code doesnt validate as it doesnt add the "class=dfjkfdjkldfjkl" to the HREFs...

    what's wrong in the new ad_network.php ?
    using "other" sites with PHP setup

    it seems to be in the loop

    foreach ($ad_network as $key => $ad) {
    if ($ads_temp[1] == $_SERVER['REMOTE_ADDR'] || $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']) {
    $ad_network[$key] = str_replace ('" />', '" class="' . $ads_temp[2] . '" />', $ad);
    } else {
    $ad_network[$key] = str_replace ('" />', '">', $ad);
    }
    }

    where it tries to check something... can I comment the if's out ?

    jez
     
    kewler, Jan 3, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    No, do not change the ad_network.php code.
     
    digitalpoint, Jan 3, 2005 IP
  3. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #3
    :) any clue on why the code wouldn put the class'es in?
     
    kewler, Jan 3, 2005 IP
  4. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it suddenly affected all my 10+ sites as I overwrote the central ad_network file yesterday... .-(
     
    kewler, Jan 3, 2005 IP
  5. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #5
    It's not supposed to display the class unless it's the validation server making the request.
     
    digitalpoint, Jan 3, 2005 IP
  6. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hey - wow! Anti-detection feature... amazin...
    Now lets just find out what's wrong with the ads...
     
    kewler, Jan 3, 2005 IP
  7. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ok... I got it...
    I host all the ads , links, etc.. I place on sites on one central server...
    this is included from all other domains (from 3 diff. servers)....

    therefore your check for the "directly requesting server" can never match...

    SHAWN-SERVER C => CONTENT-SERVER A => INCLUDE FROM AD SERVER B

    GET FROM SHAWN server C will never be seen on B,
    unless I pass it thru some param...

    jez
     
    kewler, Jan 3, 2005 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    How are you calling the ad_network.php file? If you are including it as a file across multiple sites, it should be fine. If you include it as a URL, it would not work. (You are right... you probably would want to pass it a parameter).
     
    digitalpoint, Jan 3, 2005 IP
  9. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I am doing an http include ...
     
    kewler, Jan 3, 2005 IP
  10. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #10
    Are the files on the same physical server? If so, you would be better off doing it as a file.
     
    digitalpoint, Jan 3, 2005 IP
  11. kewler

    kewler Peon

    Messages:
    480
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I know, some of them are,
    but I am using one central text ad server where this php is included locally from other php files... and those are included via http...

    so passing the remote_addr will cost me some dozens of file to adapt...
     
    kewler, Jan 3, 2005 IP
  12. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #12
    Unfortunately I can't think of any other option.
     
    digitalpoint, Jan 3, 2005 IP
  13. Lucky Bastard

    Lucky Bastard Peon

    Messages:
    406
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I thought I updated to the latest code however when I do a "view source" I still get the class="bskj9f2d" type statements. Doe sthat mean by ad_networks.php is out of date?
     
    Lucky Bastard, Jan 4, 2005 IP
  14. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #14
    No, they will slowly go away as new ads come into your cache file.
     
    digitalpoint, Jan 4, 2005 IP
  15. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Can anyone tell me where my post in this thread went? As McDar posted in the research thread, posts seem to vanish (especially yesterday). This thread is still in my subscriptions and the tick is still next to it as well. (Obviously after posting this again but before as well).
     
    T0PS3O, Jan 5, 2005 IP
  16. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #16
    Hmmm... Not sure, nothing was deleted manually from the thread. Are you sure it was this thread? What was your post?
     
    digitalpoint, Jan 5, 2005 IP
  17. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Yes I'm sure. Even more so because of the green tick still being there.

    I posted I had something similar whilst at the same time not revalidating. That has been resolved because my redirect from base was the culprit but I was still interested in this class business.

    The things was that I noticed how the first link didn't get a class tag and the other 4 did. So I wondered whether that could have caused revalidation issues. I updated the ad_network.php yesterday. i also posted the html and php code yesterday.

    <p>Some other internet browsing ideas:<br> <a href="http://www.bleepingcomputer.com">Tech Support and Spyware removal</a> / <a href="http://www.homesalewizard.com" class="bskj9f2d">Homes For Sale</a> / <a href="http://www.affilishop.co.uk/" class="8dhf2kjj">Affilishop.co.uk</a> / <a href="http://www.thesonglyrics.com" class="8dhf2kjj">Song Lyrics</a> / <a href="http://www.actiondays.co.uk/fac/" class="f82ks1ff">Conference UK</a></p>
    Code (markup):
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
        echo "<p>Some other internet browsing ideas:<br>";
    	echo ' '.$ad_network[0].' / '.$ad_network[1].' / '.$ad_network[2].' / '.$ad_network[3].' / '.$ad_network[4].'</p>';
    PHP:
    I do revalidate now. Not sure whether this is significant but it seemed odd.
     
    T0PS3O, Jan 5, 2005 IP
  18. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #18
    digitalpoint, Jan 5, 2005 IP
  19. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I guess it is, wasn't aware it moved. Actually did check whether it got a thread of its own since it happened before but must have overlooked it. Sorry! Will continue from there.
     
    T0PS3O, Jan 5, 2005 IP