GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   [WTB] Geo redirection script for my sites (https://gfy.com/showthread.php?t=869382)

st0ned 11-14-2008 06:20 PM

[WTB] Geo redirection script for my sites
 
I currently run a very large number of sites but don't do any kind of geo redirection. I read WG's thread discussing sending the traffic from countries that cannot buy a membership to somewhere that they can. I imagine this would be a great way to add some additional income.

Basically I do not know too much about this since I have never done it before. I am looking for someone who is very familiar with this process to either walk me through setting it up or to put something in place which would allow me to add it to my many sites. I have all of my links go through other URLs so that I can filter my traffic through a script.

I am looking for someone who is VERY knowledgeable in this field, not a simple script. Money is not an issue and I will more than compensate you for your time. Interested parties can contact me at fizuct at gmail dot com, thanks! :thumbsup

xsabn 11-14-2008 07:25 PM

bump for you

st0ned 11-14-2008 07:57 PM

Quote:

Originally Posted by xsabn (Post 15056146)
bump for you

Thank you sir. What happened to the CQ project?

borked 11-14-2008 11:29 PM

shot you an email with instructions on how to easily achieve this

SmokeyTheBear 11-14-2008 11:38 PM

i can give you some tips. You will need an ip database , this is used to correlate city/country to ip, these change so you basically "rent" a database so you are constantly updated with new data. maxmind.com is a popular one, they include example code to show you how to retrieve the data for your use ( such as redirection ) in your case. If you are familiar with coding a bit you should be able to follow along with the example code, if not you will need someone to set it up.

i emailed you , if you have icq i could walk you thru the setup

borked 11-15-2008 12:04 AM

Code:

<html>
<head>
<script language="JavaScript" src="http://www.geoplugin.net/" type="text/javascript"></script>
<script language="javascript">
if( geoplugin_continentCode() == 'AF' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/Africa'>"); }
if( geoplugin_continentCode() == 'AS' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/Asia'>"); }
if( geoplugin_continentCode() == 'EU' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/Europe'>"); }
if( geoplugin_continentCode() == 'NA' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/North_America'>"); }
if( geoplugin_continentCode() == 'SA' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/South_America'>"); }
if( geoplugin_continentCode() == 'OC' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/Oceania'>"); }
if( geoplugin_continentCode() == 'AN' ){  document.write("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://en.wikipedia.org/wiki/Antarctica'>"); }
</script>
</head>
</html>


borked 11-15-2008 03:11 AM

apologies, the above javascript requires registration. The non-registered version is:

<script language="JavaScript" src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>

then the rest is the same.

That javascript gives pretty much all maxmind's functionality and then some currency conversion things as well

see http://www.geoplugin.com/

Iron Fist 11-15-2008 03:50 AM

Looks great borked... props.

Axel XXX 11-15-2008 03:56 AM

Try IP2Location

borked 11-15-2008 01:00 PM

Quote:

Originally Posted by sharphead (Post 15056963)
Looks great borked... props.

thanks

for those that don't want to use javascript, and are not bothered about the detailed stats tracking with clickheat maps etc you can call one of the web APIs directly.

If you are going to call the scripts from your script, you need to pass the variable "ip" in the string, becaue otherwise it will always resolve your server's IP.

summary of available outputs:

javascript: http://www.geoplugin.net/javascript.gp?ip=xx.xx.xx.xx
php (serialized array): http://www.geoplugin.net/php.gp?ip=xx.xx.xx.xx
xml: http://www.geoplugin.net/xml.gp?ip=xx.xx.xx.xx
json: http://www.geoplugin.net/json.gp?ip=xx.xx.xx.xx

For those that want to use the currency converter output, the default base currency is US$. To set your own base currency, just tag on the variable &base_currency=XXX where XXX is the ISO 4217 3-letter code. eg

http://www.geoplugin.net/xml.gp?ip=x...e_currency=EUR

geoplugin has been running low-key for about 2.5 years now and serves this geo stuff and statistics for 13 sites, a couple of them quite major hitters. The geoplugin.net server calls are all running through C wrappers (except for the clickheat stuff which is PHP) and is extremely fast, serving somewhere in the region of 1-2mill hits per day without breaking sweat (load 0.2-0.4)

Dunno why I bothered with that sales pitch, cos its all well, free ;)


Hope it proves useful and suggestions are always welcome to improve.

st0ned 11-15-2008 01:39 PM

Thank you borked and Smokey! I have to scan through my emails and the info contained here, will be getting back to all of you. Again, thanks for the help, and I would still be willing to hook you up. :thumbsup


All times are GMT -7. The time now is 02:06 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123