Results 1 to 7 of 7

Thread: IP to Location script

  1. #1
    Member mFreak's Avatar
    Join Date
    Jul 2011
    Location
    Republic of Srpska
    Posts
    66
    Thanks
    19
    Thanked 16 Times in 9 Posts
    Rep Power
    2

    Default 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 Attached Files
    PHP Code:
    $("#mfreak").find(".head brain").clone(); 
    Progress:
    Code:
    [|||___________________________] : 5%
    Output:
    Code:
    Memory limit reached, unable to complete operation.
    Support answer:
    Code:
    Try using a super uber strong mega computer to reach at least 10%.

  2. The Following 4 Users Say Thank You to mFreak For This Useful Post:

    carebear (18-01-12), metulj (12-01-12), slowy (12-01-12), softwarefreak (11-01-12)

  3. #2
    Senior Member
    Join Date
    Mar 2010
    Posts
    147
    Thanks
    7
    Thanked 51 Times in 15 Posts
    Rep Power
    4

    Default

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

    [Only registered and activated users can see links. Click Here To Register...]

    and

    [Only registered and activated users can see links. Click Here To Register...]


    and here is the script
    Attached Files Attached Files

    [Only registered and activated users can see links. Click Here To Register...]
    Applications, Games, Wallpapers, Ringtones, Videos, Themes, Screensaver and More!!!

  4. The Following User Says Thank You to wapxtech For This Useful Post:

    Anthony (12-01-12)

  5. #3
    Member
    Join Date
    Nov 2011
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    how to put it in profile in community site teach please?

  6. #4
    Member
    Join Date
    Mar 2010
    Location
    srilanka/kataragama
    Posts
    74
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    4

    Default

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

  7. #5
    Member mFreak's Avatar
    Join Date
    Jul 2011
    Location
    Republic of Srpska
    Posts
    66
    Thanks
    19
    Thanked 16 Times in 9 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by slcash [Only registered and activated users can see links. Click Here To Register...]
    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.
    PHP Code:
    $("#mfreak").find(".head brain").clone(); 
    Progress:
    Code:
    [|||___________________________] : 5%
    Output:
    Code:
    Memory limit reached, unable to complete operation.
    Support answer:
    Code:
    Try using a super uber strong mega computer to reach at least 10%.

  8. #6
    Senior Member
    Join Date
    Mar 2010
    Posts
    147
    Thanks
    7
    Thanked 51 Times in 15 Posts
    Rep Power
    4

    Default

    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

    [Only registered and activated users can see links. Click Here To Register...]
    Applications, Games, Wallpapers, Ringtones, Videos, Themes, Screensaver and More!!!

  9. #7
    Member mFreak's Avatar
    Join Date
    Jul 2011
    Location
    Republic of Srpska
    Posts
    66
    Thanks
    19
    Thanked 16 Times in 9 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by wapxtech [Only registered and activated users can see links. Click Here To Register...]
    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.
    PHP Code:
    $("#mfreak").find(".head brain").clone(); 
    Progress:
    Code:
    [|||___________________________] : 5%
    Output:
    Code:
    Memory limit reached, unable to complete operation.
    Support answer:
    Code:
    Try using a super uber strong mega computer to reach at least 10%.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ip location for mobile phones
    By webadv in forum Scripts Forum
    Replies: 31
    Last Post: 23-01-12, 07:20
  2. Ip 2 Location
    By opticalpigion in forum Scripts Forum
    Replies: 2
    Last Post: 30-06-09, 15:47
  3. Help. Location of the User.
    By infested13 in forum REQUEST FORUM
    Replies: 3
    Last Post: 01-04-09, 13:22
  4. Php Header('location: ') ... Vs S40 & S30
    By =IceBurn= in forum Coding Forum
    Replies: 14
    Last Post: 12-07-08, 14:04
  5. Users Location On Lavalair Script
    By a13x in forum Coding Forum
    Replies: 10
    Last Post: 03-06-07, 23:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19