sniffing the IP address

by Xarzu
3 replies
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).
#address #sniffing
  • Profile picture of the author kevbo22
    Signature

    The best path to prosperity is free market capitalism!

    {{ DiscussionBoard.errors[10411687].message }}
  • Profile picture of the author casinobitcoin
    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
    {{ DiscussionBoard.errors[10413577].message }}
    • Profile picture of the author emuigai
      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
      {{ DiscussionBoard.errors[10416443].message }}

Trending Topics