IP to Location script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mFreak
    replied
    Originally posted by wapxtech View Post
    use geo.php, its maxmind geolocation =D they claim that they are the most reliable geoloc database, and for me its true. both of you tries geoloc.php, why dont you try geo.php? they have different api geoloc.php is a free api to geolocation database, thats why their database is not that reliable.

    geo.php completes your needs, not only the geolocation but also the ISP =D
    yep, its true maxmind is awesome. But for country and flag i stick to my grabber.

    Leave a comment:


  • wapxtech
    replied
    use geo.php, its maxmind geolocation =D they claim that they are the most reliable geoloc database, and for me its true. both of you tries geoloc.php, why dont you try geo.php? they have different api geoloc.php is a free api to geolocation database, thats why their database is not that reliable.

    geo.php completes your needs, not only the geolocation but also the ISP =D

    Leave a comment:


  • mFreak
    replied
    Originally posted by slcash View Post
    Wapxtech . , . When i am enter it. , . My result is unkown city and unknown cuntry . . .why that .
    Iam srilankan and location tangalle
    demo wont show my location eather. at least my script showed me that i am browsing from bosnia.

    Leave a comment:


  • slcash
    replied
    Wapxtech . , . When i am enter it. , . My result is unkown city and unknown cuntry . . .why that .
    Iam srilankan and location tangalle

    Leave a comment:


  • hitman
    replied
    how to put it in profile in community site teach please?

    Leave a comment:


  • wapxtech
    replied
    or you can try this one, choose what type of geolocation you want.. here's the 2 script demo



    and




    and here is the script
    Attached Files

    Leave a comment:


  • mFreak
    started a topic IP to Location script

    IP to Location script

    For all those who cant import those large tables for geo locating. I made this grabber. it uses curl and fetch results from remote server. Script returns array with country name, link to country flag and country shorthand name ( information is based on user IP).
    PHP Code:
    // use it like this
    $array = require 'path/to/geoip_curl.php';
    
    //country name
    $name = $array['NAME'];
    
    //country flag
    $flag_url = $array['IMG'];
    
    //short name
    $abbr = $array['ABBR'];
    
    //show results
    echo 'Country: ' . $name . "[$abbr]";
    echo "<img src='{$flag_url}' />"; 
    
    NOTE: I dont know for how long will this script work.

    I tested it on my PC and phone and it shows correct results. I hope that it helps someone.
    Attached Files
Working...
X