Solved

Calling different page depending on IP location

Posted on 2014-07-17
1
61 Views
Last Modified: 2015-03-19
I was contacted by an ad network who is proposing to pay us more for our advertising space. The way they do it is by setting a floor price for our ads. When a user enters our site, we call their adserver and if they have an ad that pays more than the floor price we set, their banner is displayed, if not, then they call our own adserver and we display an ad ourselves, like we always do.

The problem we have, is that we are based in Guatemala, and although most of our traffic comes from Guatemala, we also have a lot of traffic from the US which pays a lot better than ads from Guatemala or the rest of Latin America.

The ad network told us to create 2 accounts so that we could have 2 different floor prices: one floor price for the US, and one floor price for the rest of the world and to call the appropriate account depending on the user's IP.

So what I need to do is:

1) When the user enters my site, check his IP location.

2) If the user is from the US, we call an html page with the first ad network code, so it checks for higher paying ads than the floor price that we set for the US

3) But if the user is from any other country, we call another html page with the second ad network code, so it checks for higher paying ads than the one we set for the rest of the world, which would be lower than the floor price set for the US

Is there a simple way to do this?

Thank you
0
Comment
Question by:svensanchez
1 Comment
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now