Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Calling different page depending on IP location

Posted on 2014-07-17
1
Medium Priority
?
80 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 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 40203879
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

877 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