Black Hat Forum Black Hat SEO The only backlink provider with unlimited projects/links per day!
Go Back   Black Hat Forum Black Hat SEO > Black Hat SEO > Black Hat SEO

Black Hat SEO Black Hat Search Engine Optimization. Discuss ways to improve your sites ways using Black Hat SEO tactics!

Mad Content   BLOG SEO
Search
 
LinkWheel

LiveChatAgent



Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-01-2009, 01:51 AM
BANNED
 
Join Date: Oct 2008
Location: IN MY HEAD
Posts: 137
Thanks: 38
Thanked 57 Times in 21 Posts
Reputation: 5
iTrader: (0)
Default Geo-Targeted URLS?

Does anyone know of or have a script that geo-targets url's by country? I need something that will detect the ip/country & send the user to a URL based off country?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-01-2009, 09:52 AM
cyklotrial's Avatar
Regular Member
 
Join Date: Oct 2008
Location: Wonderland
Posts: 245
Thanks: 4,294,967,292
Thanked 75 Times in 56 Posts
Reputation: 36
iTrader: (0)
Send a message via MSN to cyklotrial
Default Re: Geo-Targeted URLS?

Use the power of SEARCH button... :P

My script....
one among many on this forum
PHP Code:
<?php 

// Get country code corresponding to an IP address 



function get_country_code ($ip) {

$c curl_init();

curl_setopt($cCURLOPT_URL"http://www.topwebhosts.org/whois/index.php?query=$ip");//otwieramy łacze ze strona

curl_setopt($cCURLOPT_HEADER1);

curl_setopt($cCURLOPT_VERBOSE1);

curl_setopt($cCURLOPT_RETURNTRANSFER,1);

curl_setopt($cCURLOPT_USERAGENT'Mozilla/5.0 (X11; U; Linux i686;pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');

curl_setopt($cCURLOPT_ENCODING'gzip');

curl_setopt($cCURLOPT_ENCODING'deflate');

curl_setopt($cCURLOPT_ENCODING'');

curl_setopt($cCURLOPT_FOLLOWLOCATION1);

$page curl_exec($c);

$code explode('country',$page);

$code explode(':',$code[1]);

$code explode('admin-c:',$code[1]);

$country_code=trim($code[0],"admin-c:");

return 
$country_code;

}

// Detect user's IP address

$user_ip $_SERVER["REMOTE_ADDR"];



// COUNTRY CODE, eg. us, fr, vn

$country_code get_country_code($user_ip);



switch(
$country_code)

    {

        case 
'US':

            
//redirect to US page            

            
break;

        case 
'UK':

            
//redirect to FR page            

            
break;

        case 
'CAN':

            
//redirect to CAN page            

            
break;

        case 
'AUS':

            
//redirect to AUS page            

            
break;

//etc...etc...etc here you can ad more countries 

        
default://other coutries

            //default redirect

    
}





?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to cyklotrial For This Useful Post:
blackxxxer (01-06-2009)
  #3 (permalink)  
Old 01-01-2009, 12:07 PM
indexyoursite's Avatar
Jr. VIP
 
Join Date: Nov 2008
Location: IŽll check my GPS & tell you
Posts: 265
Thanks: 95
Thanked 199 Times in 113 Posts
Reputation: 56
iTrader: (1)
Default Re: Geo-Targeted URLS?

Download and use ip2nation.com Mysql database and scripts, they are free. Also you can use openads it's an open source ad management application.
__________________
Is Dark - Is not for Everyone
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to indexyoursite For This Useful Post:
blackxxxer (01-06-2009)
  #4 (permalink)  
Old 01-01-2009, 04:32 PM
trophaeum's Avatar
Senior Member
 
Join Date: Dec 2007
Posts: 1,189
Thanks: 23
Thanked 688 Times in 315 Posts
Reputation: 47
iTrader: (0)
Default Re: Geo-Targeted URLS?

maxmind.com - PURCHASE their geoip country db, its the ONLY accurate database, then use http://pear.php.net/package/Net_GeoIP to do lookups
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to trophaeum For This Useful Post:
blackxxxer (01-06-2009)
  #5 (permalink)  
Old 01-01-2009, 07:37 PM
fatboy's Avatar
Senior Member
 
Join Date: Aug 2008
Location: UK
Posts: 830
Thanks: 178
Thanked 1,122 Times in 296 Posts
Reputation: 231
iTrader: (1)
Send a message via Skype™ to fatboy
Default Re: Geo-Targeted URLS?

Get the free daily updated data from: http://software77.net/cgi-bin/ip-country/geo-ip.pl
They supply code there as well to get the country from the IP.
__________________
Botcentral.net - Latest bot: Indiamail Account Creator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to fatboy For This Useful Post:
blackxxxer (01-06-2009)
  #6 (permalink)  
Old 01-01-2009, 10:57 PM
xiphre six's Avatar
Regular Member
 
Join Date: Jun 2007
Location: EU
Posts: 286
Thanks: 20
Thanked 78 Times in 29 Posts
Reputation: 13
iTrader: (0)
Default Re: Geo-Targeted URLS?

Yeah use Maxmind. There is a free, not as acurate as the paid one, but still worth a shot.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to xiphre six For This Useful Post:
blackxxxer (01-06-2009)
  #7 (permalink)  
Old 01-01-2009, 11:09 PM
Junior Member
 
Join Date: Nov 2008
Posts: 198
Thanks: 139
Thanked 1,264 Times in 153 Posts
Reputation: 63
iTrader: (1)
Default Re: Geo-Targeted URLS?

I use maxmind with the free geolite db which is quite accurate and updated monthly. You could always buy the commercial db if you needed to and use the same code. The only thing that would change is the binary db you download.

I have posted a script already as well as instructions here already :


http://www.blackhatworld.com/blackha...tml#post410382


Personally I would not use geotargetting code where you cannot keep the db locally as you introduce a dependency of an external http call to get the results and this could fail. Just another thing that can fail. This is just my opinion.

Hope this helps!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to zone69 For This Useful Post:
blackxxxer (01-06-2009)
  #8 (permalink)  
Old 01-05-2009, 06:38 AM
sikx's Avatar
Registered Member
 
Join Date: Jan 2009
Location: Germany
Posts: 65
Thanks: 22
Thanked 163 Times in 22 Posts
Reputation: 21
iTrader: (0)
Default Re: Geo-Targeted URLS?

Code:
http://nytemarez.com/geofiltering-the-right-way/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to sikx For This Useful Post:
blackxxxer (01-06-2009)
  #9 (permalink)  
Old 01-05-2009, 02:36 PM
Junior Member
 
Join Date: Nov 2008
Posts: 198
Thanks: 139
Thanked 1,264 Times in 153 Posts
Reputation: 63
iTrader: (1)
Default Re: Geo-Targeted URLS?

Quote:
Originally Posted by sikx View Post
Code:
http://nytemarez.com/geofiltering-the-right-way/
I'd prefer to not use a mysql db for geofiltering since it would mean importing data every month into a db AND would make it a much bigger pain in the ass to move to other servers. Using the method I posted with a binary db file you could just copy the files to another server for a working solution.

Each to their own, I guess.

BTW, not sure you should be promoting your new blog on your 1st post with a live link!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to zone69 For This Useful Post:
blackxxxer (01-06-2009), jmm223 (02-07-2009)
  #10 (permalink)  
Old 01-06-2009, 02:27 AM
sikx's Avatar
Registered Member
 
Join Date: Jan 2009
Location: Germany
Posts: 65
Thanks: 22
Thanked 163 Times in 22 Posts
Reputation: 21
iTrader: (0)
Default Re: Geo-Targeted URLS?

Quote:
Originally Posted by zone69 View Post
I'd prefer to not use a mysql db for geofiltering since it would mean importing data every month into a db AND would make it a much bigger pain in the ass to move to other servers. Using the method I posted with a binary db file you could just copy the files to another server for a working solution.
With binary files (even with PEAR) you are making access incredibly slow compared to a well-indexed database table. Also I don't find it very hard to setup a cronjob which basically imports the new database everyday. If you setup a UNIQUE-constraint on start_ip and end_ip you will have no problems importing it in less than 30 secs. Don't know about you, but for my solution I needed very quick data access, especially since I'm getting alot of hits everyday.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to sikx For This Useful Post:
blackxxxer (01-06-2009)
  #11 (permalink)  
Old 01-06-2009, 02:31 AM
BANNED
 
Join Date: Oct 2008
Location: IN MY HEAD
Posts: 137
Thanks: 38
Thanked 57 Times in 21 Posts
Reputation: 5
iTrader: (0)
Default Re: Geo-Targeted URLS?

Thanks everyone for the help. Thanks given to all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 01-06-2009, 01:21 PM
helaughs's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 99
Thanks: 23
Thanked 19 Times in 15 Posts
Reputation: 11
iTrader: (0)
Send a message via AIM to helaughs Send a message via Skype™ to helaughs
Default Re: Geo-Targeted URLS?

Yeah I use maxmind's commercial DB, considering the amount of money that is at stake $15/month for accurate country codes is well worth it to me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 01-07-2009, 04:06 AM
trophaeum's Avatar
Senior Member
 
Join Date: Dec 2007
Posts: 1,189
Thanks: 23
Thanked 688 Times in 315 Posts
Reputation: 47
iTrader: (0)
Default Re: Geo-Targeted URLS?

Quote:
Originally Posted by sikx View Post
With binary files (even with PEAR) you are making access incredibly slow compared to a well-indexed database table. Also I don't find it very hard to setup a cronjob which basically imports the new database everyday. If you setup a UNIQUE-constraint on start_ip and end_ip you will have no problems importing it in less than 30 secs. Don't know about you, but for my solution I needed very quick data access, especially since I'm getting alot of hits everyday.
http://pecl.php.net/package/geoip if you need as fast as possible, there is nothing faster (not even sql queries) to get the data from the maxmind stuff
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to trophaeum For This Useful Post:
zone69 (01-07-2009)
Reply

Bookmarks

Backlinks Genie

SE Nuke



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


SEO Paladin


Web Hosting
Copyright © 2005 - 2012 BlackHatWorld.com All rights reserved.