Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 27th Nov 2015, 08:47 PM   #1
New Warrior Member
 
Join Date: 2007
Location: , , .
Posts: 20
Thanks: 3
Thanked 1 Time in 1 Post
Default
sniffing the IP address
Share on: 
fb share twitter share gplus share more share

Hello Forum!

I apologize if this has already been asked and answered here.

How do I code my web site so that I can sniff out the IP address of the person visiting the site? I want to then redirect the user according to their IP address. Specifically, if the user is coming from an Arabic or Farsi country state, I want to redirect them to a different page (then if they specifically request to see the content in English, I will remember this by a cookie).
Xarzu is offline  
Unread 28th Nov 2015, 02:54 AM   #2
PHP ninja
War Room Member
 
kevbo22's Avatar
 
Join Date: 2011
Location: Denver
Posts: 124
Thanks: 13
Thanked 27 Times in 25 Posts
Default
Re: sniffing the IP address
Share on: 
fb share twitter share gplus share more share

https://github.com/maxmind/geoip-api-php

The best path to prosperity is free market capitalism!
kevbo22 is offline  
Unread 29th Nov 2015, 11:36 AM   #3
Warrior Member
 
Join Date: 2015
Location: Panama
Posts: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: sniffing the IP address
Share on: 
fb share twitter share gplus share more share

Do you know what the backend technology is? PHP is most common around here, especially with WordPress.

Assuming you're using PHP - Use this:

echo $_SERVER['REMOTE_ADDR'];

PHP: $_SERVER - Manual
casinobitcoin is offline  
Unread 1st Dec 2015, 04:59 AM   #4
Warrior Member
 
Join Date: 2014
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default
Re: sniffing the IP address
Share on: 
fb share twitter share gplus share more share

If you are using php this is easily achievable.
Just check geoip or better yet contact me and I will give you an example of a site I created that shoes the country you are coming from, ip and other stuffs
emuigai is offline  
Closed Thread


Bookmarks

Tags
address, sniffing


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 Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:58 AM.