Solved

Calling different page depending on IP location

Posted on 2014-07-17
1
67 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
ID: 40203879
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adjust the position 3 60
How does Redux fit into React? 3 79
Problem to error 4 59
How to parse the string and split the sub directory names in asp.net 7 41
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

777 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