Home > Facebook, PHP > How To Get Real IP User In Facebook Application

How To Get Real IP User In Facebook Application

February 22nd, 2010 Admin Leave a comment Go to comments

In general we will use “$_SERVER['REMOTE_ADDR']” to get the IP of the visitor, but this does not apply in Facebook, because it will only remove IP from the server itself Facebook. If you are a facebook application developer, then there are ways we can use to get the IP of our facebook application visitor.

Here is the code used in music applications online http://apps.facebook.com/mpthreeecho

$ip            = array_values($_SERVER);
$ip            = $ip[8];

Hopefully this brief article may help you in recording the statistics of your facebook application.

  1. Cheshmehregi
    August 13th, 2010 at 16:27 | #1

    Hello again , can you please add a reciprocal link to the Link Exchange Plugin ?
    http://www.linkexchangewp.com/
    i have contacted them but they dont answer my emails , i really appreciate if you help me , thanks

  1. No trackbacks yet.