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.

Block International Traffic

Discussion in 'Publisher Network' started by aaron_nimocks, Mar 14, 2006.

  1. #1
    Ok I found one very complicated script to block out the international traffic but I get confused when I have to read a manual.
    SEMrush
    Has anyone seen a small easy to install script to not display YPN ads to anyone outside the US? I wonder why someone hasnt made one yet and marketed it. Could get a ton of $5 orders! :)

    Thanks!
     
    aaron_nimocks, Mar 14, 2006 IP
    SEMrush
  2. SkiRat44

    SkiRat44 Peon

    Messages:
    480
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    They'd have a customer with me. :)
     
    SkiRat44, Mar 14, 2006 IP
  3. DomainMaster

    DomainMaster Banned

    Messages:
    576
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have a script but it's very resource consuming and requires a database.
     
    DomainMaster, Mar 14, 2006 IP
  4. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #4
    I used the free maxmind db and tied it in with my mysql for quick resolving when the user goes through multiple pages. Its very fast and I haven't noticed any slowups or heavy resource usage.

    Basically, in your index.php (for example), you grab the IP of the user, check whether its already in mysql, if not, then look it up in the binary file maxmind country db, and store it in mysql.

    Then my banners being pulled from mysql have a country field. In there I can specify 'us', or '!us' (for everything international), or even 'gb', etc if I wanted to. I also have it set to default to 'us', in case its not found in the maxmind db (an option I couldn't find in the maxmediamanager tool).

    I was getting crappy money from ADSense, so I turned off (its easy to turn on/off) my alternative ads this morning while I set up different banners that work better on a game and video site :eek:, but its still checking. It's cool to see live whos coming and going...:)

    If you think there's a real market for such a thing, I'll happily script something up and give it away free to DP testers :) .

    -Matt
     
    quaffapint, Mar 15, 2006 IP
  5. aaron_nimocks

    aaron_nimocks Im kind of a big deal Staff

    Messages:
    5,563
    Likes Received:
    627
    Best Answers:
    0
    Trophy Points:
    420
    #5
    I think there is a market. Only if its small and VERY simple to install.
     
    aaron_nimocks, Mar 15, 2006 IP
  6. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Do you have PHP and MySQL ? The only large file is the binary db file from maxmind, which is around 800K.
     
    quaffapint, Mar 15, 2006 IP
  7. ashiezai

    ashiezai Peon

    Messages:
    927
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #7
    please use the search function :D

    this is from the thread:
    http://forums.digitalpoint.com/showthread.php?t=55428&page=2&highlight=ypn+geo+targeting

    How not to display YPN to international traffics.

    Step by step:

    1. Download these files:
    - GeoIP.dat from http://www.maxmind.com/app/geoip_country
    - geoip.inc from http://www.maxmind.com/download/geoip/api/php/
    and put them where your php banner script will be.

    2. insert this code for you YPN.
     
    ashiezai, Mar 15, 2006 IP
  8. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #8
    Would that not be slow having to poll that 800K flatfile db on every page hit?
     
    quaffapint, Mar 15, 2006 IP
  9. wentworth

    wentworth Guest

    Messages:
    968
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #9
    will one of the mod of this board please combine all the INT TRAFFIC threads....

    please, please...
     
    wentworth, Mar 15, 2006 IP
  10. aaron_nimocks

    aaron_nimocks Im kind of a big deal Staff

    Messages:
    5,563
    Likes Received:
    627
    Best Answers:
    0
    Trophy Points:
    420
    #10
    I have seen that thread but I am looking for something smaller, faster, and easier.
     
    aaron_nimocks, Mar 15, 2006 IP
  11. thame

    thame Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It won't actually be downloading the db every time someone accesses the site. I think a simple PHP script like this (not involving PHPAdsNew or other programs) is the quickest way for your users.

    If you need a database, I think there are some free hosting companies out there with PHP MySQL or I could even give you a remote one to connect to if you really need it.
     
    thame, Mar 15, 2006 IP
  12. JoaT

    JoaT Active Member

    Messages:
    297
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    70
    #12
    ashiezai,

    This code only works ONCE per page, if you have more than one ad unit it will not work like this. Some suggested putting another close like at the end for $gi, but that doesnt work either.
     
    JoaT, Mar 15, 2006 IP
  13. ashiezai

    ashiezai Peon

    Messages:
    927
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #13
    just do a search and replace. That is easy.
     
    ashiezai, Mar 16, 2006 IP
  14. flyguy

    flyguy Peon

    Messages:
    198
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Would it be possible to include the ip range for the US and hard code it in the php script on the web page? I've never looked at an ip data base before so I don't know how much data / country ip there is but it could be a simple solution to eliminate most of the international add servings.

    With no mysql required.
     
    flyguy, Mar 16, 2006 IP
  15. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #15
    So besides general speed concerns, what's the issue here - people don't have/want to use PHP and/or MySQL?
     
    quaffapint, Mar 16, 2006 IP
  16. JoaT

    JoaT Active Member

    Messages:
    297
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    70
    #16
    In my opinion, the issue is not about capabilities. Anyone can get PHP & MySQL even on a free host! The problem is, there is no working script thats just a cut and paste job to make work without modification. The one post above in this thread only works once per page, if you try to use it again it does not work and nobody has been able to give an exact code scenario that will work multiple times per page for people that don't know programming. Hence, why it would be such a lucrative business if someone where to develope something that worked multiple times per page and offer it for $5-10 per license etc.
     
    JoaT, Mar 16, 2006 IP
  17. Caveman

    Caveman Peon

    Messages:
    591
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I for one would love to use this and would prefer php and mysql. I also think it would be easier to just us a php include to show the ads.

    quaffapint, the way you're doing this, does it default back to adsense if the ip does not come from the U.S.?
     
    Caveman, Mar 16, 2006 IP
  18. flyguy

    flyguy Peon

    Messages:
    198
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I'm going to run with ashiezai post for now. It seems to run smoothly.

    I had to make a couple of mods to the script so could someone with a non US ip address check the results at http://www.enfollc.com/test.php and let me know what they receive?

    ashiezai- Where could an if else be incorporated to run adsense when the ip isn't US? Since I can't test the script myself for international ips I'm not confident.

    Good stuff thanks.
     
    flyguy, Mar 16, 2006 IP
  19. quaffapint

    quaffapint Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #19
    Yea - I have my adsense banners country field set to '!us' (not US) - so they display in every country other than the US. (I also have some specific ones for 'gb'.)

    Its turned on at my arcade site now (for all ads except the one on the right side), if any international DP visitors want to test it out for me ;).

    -Matt
     
    quaffapint, Mar 16, 2006 IP
  20. Caveman

    Caveman Peon

    Messages:
    591
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #20
    I'd be interested in this. I've already got the DB set up using the instructions found here. I'm just having a time with the actual php code to make it work.
     
    Caveman, Mar 16, 2006 IP