Free geo-ip for your website (test this)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SmokeyTheBear
    ►SouthOfHeaven
    • Jun 2004
    • 28609

    #1

    Free geo-ip for your website (test this)

    I often see people asking for an easy free solution so here goes
    p.s. because its free its not perfect but it also is alot less tasking on your server than most free methods

    exampe usage of below code
    http://ytmnd.webspacemania.com/freegeo/
    Code:
    
    <html>
    <head>
    </head>
    <body>
    
    
    Hi, I'm Brooke i live in 
    
    
    
    
    
    
    <?php
    // ip to html by stb
    $addr = getenv("REMOTE_ADDR");
    $url = "http://api.hostip.info/get_html.php?ip=$addr&position=true";
    $html = file_get_contents($url);
    $trip = explode('Latitude:',$html);
    $ctcn = $trip[0];
    $trip = explode('City: ',$ctcn);
    $ctcn = trim($trip[1]);
    echo $ctcn;
    ?>
    
    
     and i'm super horny
    
    
    
    </body>
    </html>
    hatisblack at yahoo.com
  • Damian_Maxcash
    So Fucking Banned
    • Oct 2002
    • 12745

    #2
    Originally posted by SmokeyTheBear
    I often see people asking for an easy free solution so here goes
    p.s. because its free its not perfect but it also is alot less tasking on your server than most free methods

    exampe usage of below code
    Hey - its better than the one in your sig!

    but I did go to the site and update the record for my IP

    Everyone should do that - it might make it worth using on bigger projects.

    If it doesn't get yours right click here www.hostip.info and you can change it for them.

    Comment

    • martinsc
      Too lazy to set a custom title
      • Jun 2005
      • 27047

      #3
      Hi, I'm Brooke i live in (Unknown city) and i'm super horny
      i guess it has some issues with israel....
      Make Money

      Comment

      • Sly
        Let's do some business!
        • Sep 2004
        • 31377

        #4
        Apparently it doesn't know San Diego either.
        Vacares - Web Hosting, Domains, O365, Security & More - Paxum and BTC Accepted

        Windows VPS now available
        Great for TSS, Nifty Stats, remote work, virtual assistants, etc.
        Click here for more details.

        Comment

        • Damian_Maxcash
          So Fucking Banned
          • Oct 2002
          • 12745

          #5
          Originally posted by Sly
          Apparently it doesn't know San Diego either.
          Did you go and change it for them?

          Comment

          • woj
            <&(©¿©)&>
            • Jul 2002
            • 47882

            #6
            doesn't work for me either :-/
            "Hi, I'm Brooke i live in (Unknown City?) and i'm super horny"
            Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
            Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
            Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

            Comment

            • soulbleed
              Confirmed User
              • Oct 2005
              • 2606

              #7
              didnt work for me

              Earn $20 per bottle of FREE penis enhancement pills you give away.
              Payments via Paypal, epassporte, check and wire.

              Comment

              • Sly
                Let's do some business!
                • Sep 2004
                • 31377

                #8
                I fixed it. Must need a lot of work.
                Vacares - Web Hosting, Domains, O365, Security & More - Paxum and BTC Accepted

                Windows VPS now available
                Great for TSS, Nifty Stats, remote work, virtual assistants, etc.
                Click here for more details.

                Comment

                • SmokeyTheBear
                  ►SouthOfHeaven
                  • Jun 2004
                  • 28609

                  #9
                  Originally posted by damian2001
                  Hey - its better than the one in your sig!

                  but I did go to the site and update the record for my IP

                  Everyone should do that - it might make it worth using on bigger projects.

                  If it doesn't get yours right click here www.hostip.info and you can change it for them.


                  everyone should go to www.hostip.info and add their city to the list , its a user built databse
                  hatisblack at yahoo.com

                  Comment

                  • SmokeyTheBear
                    ►SouthOfHeaven
                    • Jun 2004
                    • 28609

                    #10
                    its also got a cool plugin for firefox to show the city location of any link

                    like this
                    hatisblack at yahoo.com

                    Comment

                    • Bro Media - BANNED FOR LIFE
                      MOBILE PORN: IMOBILEPORN
                      • Jan 2004
                      • 16502

                      #11
                      nice job smokey, ill put it to use

                      Comment

                      • Evil1
                        Confirmed User
                        • Mar 2002
                        • 3893

                        #12
                        New Castle, DE?? 301.68 miles off!

                        Comment

                        • phasic
                          Confirmed User
                          • Jul 2005
                          • 2104

                          #13
                          Thanks smokey, answered my ? directly. Although its extremely faulty. How many people got it right on the first visit with out correcting? I guess if its the only free method thats my only choice though, eh?
                          Brief revisit. (mic drop)

                          Comment

                          • Yngwie
                            I am an Alien from space
                            • May 2003
                            • 11118

                            #14
                            Originally posted by woj
                            doesn't work for me either :-/
                            "Hi, I'm Brooke i live in (Unknown City?) and i'm super horny"

                            didn't work for me, but I went to http://www.hostip.info/index.html and added my city to their list and now it works.
                            ICQ: 16544251 - Skype: gator37 @ eastlink.ca - email: yngwie @ isys.ca

                            Comment

                            • heywood
                              So Fucking Banned
                              • Jun 2003
                              • 468

                              #15
                              Originally posted by phasic
                              Thanks smokey, answered my ? directly. Although its extremely faulty. How many people got it right on the first visit with out correcting? I guess if its the only free method thats my only choice though, eh?
                              Most of the GeoIP stuff out there is less than accurate. I think this is something that will certainly take time to iron out. ISPs pop up switch around so much these days, it seems like it would be a nightmarish database to maintain.

                              Thanks for the info smokey, I've worked on a couple solutions myself, but yours seems the easiest. I worked with the free version of GeoIPmax and the database version is horrible (took me forever to figure out a good index, and even then it was slow) and the binary version is decent. But I think the one smokey posted above the simplest for our end.

                              BTW Smokey, would you be willing to verify some code (my zango removal tool (link to thread)) and post the results?

                              Comment

                              • pornpf69
                                Too lazy to set a custom title
                                • Jun 2004
                                • 15782

                                #16
                                I have their "script" and their free DB on my server

                                Comment

                                • SmokeyTheBear
                                  ►SouthOfHeaven
                                  • Jun 2004
                                  • 28609

                                  #17
                                  Originally posted by phasic
                                  Thanks smokey, answered my ? directly. Although its extremely faulty. How many people got it right on the first visit with out correcting? I guess if its the only free method thats my only choice though, eh?
                                  theres a few other free services available , they require a bit more work though , i figured i would post the "easy smeazie" way..

                                  The thing with most geo-ip services is the database is a few mb's so everytime someone hits your script your server has to look thru the db file.. this method is less taxing on your server
                                  hatisblack at yahoo.com

                                  Comment

                                  • borked
                                    Totally Borked
                                    • Feb 2005
                                    • 6284

                                    #18
                                    Originally posted by SmokeyTheBear
                                    The thing with most geo-ip services is the database is a few mb's so everytime someone hits your script your server has to look thru the db file.. this method is less taxing on your server
                                    Not really - I'm using geoip perl and benchmarking apache with 500k hits on the perl script (lookup on a 25MB city binary database binary) didn't really tax the server at all....

                                    if people like, I'll open it up to all - it's geolite, so it's not 100%.

                                    Hey, if enough people are willing to subscribe at, say $1/10k lookups, I'll get the main, pretty darn accurate maxmind city database...

                                    For coding work - hit me up on andy // borkedcoder // com
                                    (consider figuring out the email as test #1)



                                    All models are wrong, but some are useful. George E.P. Box. p202

                                    Comment

                                    • Basic_man
                                      Programming King Pin
                                      • Oct 2003
                                      • 27360

                                      #19
                                      (Unknow City) ... that's farrrrrrrrrr from here :P
                                      UUGallery Builder - automated photo/video gallery plugin for Wordpress!
                                      Stop looking! Checkout Naked Hosting, online since 1999 !

                                      Comment

                                      • jesse_adultdatingdollars
                                        Confirmed User
                                        • Apr 2006
                                        • 2197

                                        #20
                                        Works for me in San Diego
                                        Got Dating Traffic?
                                        Contact: Jesse (at) adultdatingdollars.com ICQ: 296775809 or AIM: cabotime21

                                        Comment

                                        • interracialtoons
                                          Confirmed User
                                          • May 2006
                                          • 1910

                                          #21
                                          Works for me!
                                          Done.

                                          Comment

                                          • quantum-x
                                            Confirmed User
                                            • Feb 2002
                                            • 6863

                                            #22
                                            Or even easier:

                                            PHP Code:
                                            preg_match_all('`^[^:]+: (.+)$`misU',file_get_contents('http://api.hostip.info/get_html.php?ip='.$SERVER['REMOTE_ADDR'].'&position=true'),$matches);
                                            
                                            echo $matches[1][0]."<br />";
                                            echo $matches[1][1]."<br />";; 
                                            
                                            Outputs
                                            AUSTRALIA (AU)
                                            Brisbane
                                            One line solutions rock.
                                            Last edited by quantum-x; 10-29-2006, 08:46 AM.
                                            PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

                                            Comment

                                            • borked
                                              Totally Borked
                                              • Feb 2005
                                              • 6284

                                              #23
                                              if people are not getting accurate results from hostip.info, the following should be better:

                                              http://geo.corecoder.com/

                                              to test your own ip, or

                                              http://geo.corecoder.com/?ip=xx.xx.xx.xx

                                              to test a specific one.

                                              If you want all data, not just the city, it can be found here:

                                              http://geo.corecoder.com/full?ip=xx.xx.xx.xx

                                              For coding work - hit me up on andy // borkedcoder // com
                                              (consider figuring out the email as test #1)



                                              All models are wrong, but some are useful. George E.P. Box. p202

                                              Comment

                                              • SmokeyTheBear
                                                ►SouthOfHeaven
                                                • Jun 2004
                                                • 28609

                                                #24
                                                Originally posted by quantum-x
                                                Or even easier:

                                                PHP Code:
                                                preg_match_all('`^[^:]+: (.+)$`misU',file_get_contents('http://api.hostip.info/get_html.php?ip='.$SERVER['REMOTE_ADDR'].'&position=true'),$matches);
                                                
                                                echo $matches[1][0]."<br />";
                                                echo $matches[1][1]."<br />";; 
                                                
                                                Outputs


                                                One line solutions rock.
                                                much better and simpler.. i bow to the power of proper php
                                                hatisblack at yahoo.com

                                                Comment

                                                • starpimps
                                                  Confirmed User
                                                  • Sep 2006
                                                  • 6954

                                                  #25
                                                  it got me in canada but wrong city
                                                  Teen Porn Models / Solo Girls

                                                  Comment

                                                  Working...