1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

[Download] **** IP 2 Country Script **** I wrote 100% FREE

Discussion in 'Programming' started by Vooler, Jul 5, 2008.

  1. #1
    WHY RELY OR THIRDPARTY SITES TO GET THIS SMALL INFORMATION?

    As usual, another script comes out for all of our community members, espeically developers who wish to do this task and need to rely on third-party ip2country services, and sometimes when such services' link go outdated and expired, your script becomes malfunctioning. Then why not have our own small approximately 3 MB database of IP addresses that can provide us complete information about our user. The scripts are 100% my very own written.

    Download: http://www.apitalk.com/scripts/ip2c/ip2c.zip


    So, here we go (bingo):


    I hope you guys appreciate this one aleast :D.

    regards
     
    Vooler, Jul 5, 2008 IP
  2. priyakochin

    priyakochin Banned

    Messages:
    4,740
    Likes Received:
    138
    Best Answers:
    0
    Trophy Points:
    0
    #2
    wow thankz a lot for the work.
     
    priyakochin, Jul 5, 2008 IP
  3. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #3
    proxywhereabouts, Jul 5, 2008 IP
  4. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #4
    As per suggestion of anther member azizny, I will put script together alongwith demo, but first they must be atleast 50. Besides I will put small demo after a while.

    regards
     
    Vooler, Jul 5, 2008 IP
  5. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #5
    Vooler, Jul 6, 2008 IP
  6. Scriptona

    Scriptona Notable Member

    Messages:
    4,957
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    280
    #6
    Can we enter ip and see it's country or it just read the country of the one viewing the site ?
     
    Scriptona, Jul 9, 2008 IP
  7. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #7
    Ofcourse the function accepts the ip address.
    If you did not see examples yet

    The code was :
    Replace $_SERVER['REMOTE_ADDR'] with hard coded ip as
    regards
     
    Vooler, Jul 9, 2008 IP
  8. comitpro

    comitpro Active Member

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    93
    #8
    thanks! great share! keep up the good work!
     
    comitpro, Jul 10, 2008 IP
  9. Scriptona

    Scriptona Notable Member

    Messages:
    4,957
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    280
    #9
    I meant that user enters the IP into a text box and the script outputs the country.

    Like dnsstuff ip tool
     
    Scriptona, Jul 10, 2008 IP
  10. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #10
    Well that will be fairly simple. I will post back example, but now am headed to bed. Please just send me a private message as reminder so that I don forget.

    regards
     
    Vooler, Jul 10, 2008 IP
  11. candychip

    candychip Active Member

    Messages:
    272
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #11
    hi vooler

    thanks for the nice script

    can you also tell what other remote information we can extract.

    like CIty, ISP, other details etc. with these scripts.

    as in some sites I have seen they give city information , and even tell ISP who is your ISP.
     
    candychip, Jul 10, 2008 IP
  12. nabilacute

    nabilacute Active Member

    Messages:
    619
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #12
    Thanks. i'm permission for download :)
     
    nabilacute, Jul 10, 2008 IP
  13. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #13
    Tech Entrance You did not send me reminder through, but these replies reminded me :)
    Here is the code you require.
    test.html
    <form method="post" action="myscript.php">
    Enter Ip to look up <input type=text size=15 name="ip"> 
    <input type=submit value="GO">
    </form>
    HTML:
    myscript.php
    <?
    
        $info = get_ip_info(@$_POST['ip']); 
    
        print $info['ip_country'];
    ?>
    PHP:
    I hope it helps.


    candychip
    Database is limited to country name, country code 2/3 characters.
    If I find such a database and/or a new mechanis I will implement and relase version 2, or may be we integrate it with interactive wordmap.

    regars
     
    Vooler, Jul 10, 2008 IP
  14. easterwolf

    easterwolf Well-Known Member

    Messages:
    608
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    108
    #14
    Nice work! thanks for the share it is appreciated.
     
    easterwolf, Jul 16, 2008 IP
  15. pipba

    pipba Guest

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    thanks!
    any idea on the accuracy of this database?
    will you keep the DB updated and release it on this forum?
     
    pipba, Jul 17, 2008 IP
  16. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #16
    I have remove the demo.
     
    proxywhereabouts, Jul 19, 2008 IP
  17. pipba

    pipba Guest

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    may i ask why? too many resourced used?
     
    pipba, Jul 19, 2008 IP
  18. th3programmer

    th3programmer Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #18
    thanks for the share i will try it
     
    th3programmer, Jul 19, 2008 IP
  19. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #19

    just clearing up server's space. Maybe OP can put up a new demo.
     
    proxywhereabouts, Jul 19, 2008 IP
  20. MadK3

    MadK3 Active Member

    Messages:
    52
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #20
    Hello, I have found your thread through Google while searching for "IP To Country PHP".

    I have successfully installed your script; however, I have a question. Are you using the .csv database from ip-to-country.webhosting.info/ and is it possible to update it ourselves? I also have another question. Is it possible to make the country names without it all being capitalized? I'd prefer reading Canada instead of CANADA!

    Thank you, great release though!

    I have put up demos for the grand public:

    mafia-mp.com/Example1.php
    mafia-mp.com/Example2.php
    mafia-mp.com/Example3.php
    mafia-mp.com/Example4.php
     
    MadK3, Jul 21, 2008 IP