Mini Ad-Server

Discussion in 'PHP' started by Vincent, Jun 4, 2006.

  1. #1
    Hi,
    I'm planning to pay some webmasters to show text link ads. As I want to change these links from time to time and don't want to email every webmaster to change them, I thought about this:
    I ask the webmaster who shows the ad to insert the following code
    <?php include("http://www.mydomain.tld/textlinkads.txt"); ?>
    Code (markup):
    So I can change the links whenever I want and he has no work with it. Do you regard this as a good idea? Or do you have better ideas?

    Vincent
     
    Vincent, Jun 4, 2006 IP
  2. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #2
    It's a good idea but it'd be better to have your advertisers use client-side code like Javascript or iframes, this way PHP won't be a requirement and your advertisers won't have to worry about your PHP code causing trouble on their websites.
     
    sketch, Jun 4, 2006 IP
  3. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #3
    You can also use a .JS file to display your ads using javascript as mentioned above.(In case you don't want to use IFRAMES)
     
    JEET, Jun 4, 2006 IP
  4. themole

    themole Peon

    Messages:
    82
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use PHP because last I knew the SE's don't crawl javascript stuff.

    -the mole
     
    themole, Jun 4, 2006 IP
  5. rosiee007

    rosiee007 Notable Member

    Messages:
    3,352
    Likes Received:
    179
    Best Answers:
    0
    Trophy Points:
    230
    #5
    have you tried using php ads server? That should do what you want.
     
    rosiee007, Jun 4, 2006 IP
  6. Vincent

    Vincent Active Member

    Messages:
    158
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #6
    You're right. To have the links crawled by Google, they must be included server-side.
     
    Vincent, Jun 5, 2006 IP
  7. Vincent

    Vincent Active Member

    Messages:
    158
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #7
    What do you mean with "php ads server"?
     
    Vincent, Jun 5, 2006 IP
  8. SecondV

    SecondV Active Member

    Messages:
    76
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    70
    #8
    Probably referring to: phpAdsNew
     
    SecondV, Jun 5, 2006 IP
  9. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If it was my website I wouldn't agree to including code from another site. It gives you control over the content on another site. How would they know you wouldn't alter the advert to some porn link?

    And yes, don't use JS or iframes for this.
     
    mad4, Jun 5, 2006 IP
  10. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #10
    Regarding the PHP option, keep in mind that some hosts turn off 'allow_url_fopen' which would disallow includes or fileopens over http.
     
    quaffapint, Jun 6, 2006 IP