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)
-   -   Traffic Monetize By Countries [ Business ] Need Help... (https://gfy.com/showthread.php?t=879211)

adonthenet 01-03-2009 04:10 AM

Traffic Monetize By Countries [ Business ] Need Help...
 
Hey all,
I'm looking for some sort of script that would take a surfer to a page according to his country


For example : US surfer that comes to the site goes to LINK A when he click on a button
UK surfer that comes ot the site and click on the same button goes to LINK B ( link related to UK only )

Canadian Surfer clicks on the same button goes to LINK C ( link related to his country - Canada )

Rest of the world go to Link D for example...




Who can help with this? anyone know some sort of script? how I can get it done?

Thanks in advance GFY community ! :winkwink:

SordidMedia 01-03-2009 04:49 AM

http://www.maxmind.com/app/geoip_country is the IP/Country database.

http://www.geoadsphp.com/ is one solution for you.

I have a custom script that I can sell you fairly cheaply also if you are interested that is very simple to use.

adonthenet 01-03-2009 05:06 AM

Thanks, anyone else?

adonthenet 01-03-2009 10:27 AM

Bump it up... :)

ravo 01-03-2009 10:29 AM

Go with Maxmind's database and API. Any competent host should be able to set this up for you, so it's available as an enviromental variable (which means would can do a simple redirect thru htaccess).

CurrentlySober 01-03-2009 10:39 AM

Talk to Borked...

borked 01-03-2009 04:43 PM

<?php
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();

$geoplugin->locate();

echo "<a href='/{$geoplugin->countryCode}.html'>Your own country link</a>";

?>

see http://www.geoplugin.com/webservices/php#php_class

all there is to it ;)

borked 01-03-2009 04:49 PM

more precisely based on your requirements...
Code:

<?php
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();

$geoplugin->locate();

switch ($geoplugin->countryCode) {
  case 'US':
    $url = 'US.html';
    break;
  case 'UK':
    $url = 'UK.html';
    break;
  case 'CA':
    $url = 'CA.html';
    break;
  default:
    $url = 'default.html';
}
echo "<a href='/{$url}'>Your own country link</a>";

?>



All times are GMT -7. The time now is 09:11 AM.

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