How to show User Location [Country name]

Discussion in 'Programming' started by ruberr2002, May 9, 2008.

  1. #1
    Hi
    In have one pligg based website (totalpad.com) where, in Admin mode I can view users' last login IP address. Is there any way that it can show Country name (with or without flag) based upon the last loging IP address.
    Please see the picture for current screen of user profile (for admin use)
    Thanks
     

    Attached Files:

    • ipa.PNG
      ipa.PNG
      File size:
      49 KB
      Views:
      201
    ruberr2002, May 9, 2008 IP
  2. Sabbir

    Sabbir Banned

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Hi create a databse on IP and corresponding country. extract data from the databse.
    i hope you will find a database in the web.
     
    Sabbir, May 9, 2008 IP
  3. Sabbir

    Sabbir Banned

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Hi i can do it for $50.
    please note that my country do not supprted by paypal.
     
    Sabbir, May 9, 2008 IP
  4. coder999

    coder999 Banned

    Messages:
    727
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    I can do it for $70 PayPal pm me your yahoo id
     
    coder999, May 9, 2008 IP
  5. ruberr2002

    ruberr2002 Peon

    Messages:
    463
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Are you guys kidding? Its not even $5 worth job to do. All I can give is $10 to someone who can do it.
    Thanks
     
    ruberr2002, May 9, 2008 IP
  6. ruberr2002

    ruberr2002 Peon

    Messages:
    463
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    I have uploaded IP2C database file. I already have mysql database table which stores the IP addresses.
    I am not the programmer, Can someone please advise what to write to grab the data & show country name?
    thanks
     
    ruberr2002, May 9, 2008 IP
  7. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    Ok I'll do it for 10$. Please PM Me with the details.. Thanks !!
     
    saurabhj, May 9, 2008 IP
  8. Calibula

    Calibula Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    It's very easy. Just grub the information of the IP and Country with a variable and do an INSERT to put the info in the database.
    Send me a PM with your email/msn and i'll help you with that.. I'm not going to charge you, but i'm not going to do it FOR you, just help you..
     
    Calibula, May 9, 2008 IP
  9. Sabbir

    Sabbir Banned

    Messages:
    210
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #9
    i gave you the idea, but when i check the database i found it will be difficult for a non programmer to do all the tricks. then i mad my bid. but any way best of luck to your work.
     
    Sabbir, May 9, 2008 IP
  10. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #10
    You can find free database online, search google. I saw one the other day, just can't remember where it was, but was open source.
     
    phpl33t, May 9, 2008 IP
  11. Im The ONE

    Im The ONE Peon

    Messages:
    800
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    Alternative method is using hostip's API.
    http://api.hostip.info/country.php?ip=xx.xx.xx.xx (xx.xxx.xx.x is the IP address)

    Use cURL to fetch the data
    
    <?php
    $ip=$_SERVER['REMOTE_ADDR'];
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,"http://api.hostip.info/country.php?ip={$ip}");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    $country=curl_exec ($ch);
    curl_close ($ch);
    
    echo $country;
    ?>
    
    PHP:
     
    Im The ONE, May 10, 2008 IP
  12. ruberr2002

    ruberr2002 Peon

    Messages:
    463
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #12
    Hi !nd!an
    PM sent. Please check. thanks
     
    ruberr2002, May 10, 2008 IP