User20182_4_t Karen George
Find Homes for Sale in your city:
Members: 120,713 - 2,644 Online Now  Login
 

As some of you know, I've been working on a I.P-based, geo-targeted advertising system.  Once it actually works 100%, I will launch the site http://www.geozoodle.com/.  Currently, I am looking at a conservative launch date of January 1st, but I could be done as soon as next week.

This post is pretty technical, and I really don't expect anyone to read it, unless you are interested in my GeoZoodle widgets (like the one at the top of this post).  If you are a technical-type person, you'll probably enjoy this post. For everyone else, expect your eyes to glaze over very soon.

Right now, there is nothing at GeoZoodle.  I figure why launch the site, if it isn't working 100% correctly?

However, I did know that it was working about 95% correctly, so I offered some "widgets" to ActiveRainers.  Primarily, that welcome mat that you see on the right side of my blog.  You can still get the code to the Welcome Mat if you simply email widget3@geozoodle.com (don't worry about sending a message; you'll get an auto-reply).

It's pretty cool if you are in the 95% who see the proper state displayed on the mat.

However, I've received about 5 emails from people for whom GeoZoodle doesn't "work".  Or, in other words, it doesn't display the proper city or state.  Many of you have expressed concerns that there may be something wrong with your computer.

There is nothing wrong with your computer.  And for my cowardly detractors (who bad-mouth me in other forums), there is nothing wrong with my code.  I would think, before speaking in ignorance about me, you would know how to program in PHP yourself and had an understanding of this.  If you had an understanding, you would know that there is no bug and the site "works" just fine.

The code is short, simple and 100% bug free.

So why doesn't the GeoZoodle widget work for some of you?  Are some of you seeing the wrong state at the top of this post?  Or maybe on my right-side welcome mat?

--- This next part is pretty boring; if you are happy with your widget, you probably don't want to bother. ---

Just to set your minds at ease, here is how GeoZoodle (or any online geographic targeting system works):

First, I get your I.P. address as soon as you visit this page.  It's very simple to do; it's literally only one line of code.  Just Google "code for get I.P" or something and you can see it for yourself.

Next, there is a database stored on GeoZoodle.  This is not a database that I created, but one that I purchased from a well-known data provider.  Picture the database as an Excel Spreadsheet...an enormous Excel spreadsheet that contains over 3,000,000 rows.

Once I get your I.P., I take the "dots" out, so that I can make it into a real number.  For those of you that know what an I.P looks like, it's not a "real" number...  Aw heck, I'll just show you your I.P. address; it's so simple.  This is your very own, unique-to-your-computer I.P. address:

Now, with one simple line of code, I remove the "dots" in your I.P.  In this database (again, picture an enormous Excel Spreadsheet), it has rows and rows of data.  A row of data looks like this:

[start IP] [end IP] [city] [state_or_region] [country] [zip_code]

So, once I have your I.P., I just issue a command to the database that looks something like this:

Select the row of data, where my user's IP address lands between "start IP" and "end IP".  Now, display the user's city and state based on the "row" it finds with the I.P.

So the million dollar question:  Why doesn't GeoZoodle work properly for some users?

Simply put:  Because creating a database that contains every city in the entire world is an arduous task, at best.  The data mining company that I purchased the database from is updating it each and every day.  For the rest of my life, I will get monthly updates to the database, which means GeoZoodle will become more and more accurate each month.

However, I am not that patient.  I am currently working on a method to update the database myself.  (This is actually more complex than it sounds.) I don't intend to wait around for the database company to slowly update it.  They could be working on I.P. addresses in Vietnam right now, for all I know.  (Remember, this is a world-wide database.)

For those of you that want GeoZoodle widgets and real estate solutions for your site, know that this will be working very, very soon.  I have some phenomenal ideas to help agents and loan officers and I will unveil the finished product no later than the first of the new year.

Thanks for reading this post! I hope you are still awake!

 
Post is included in group: The Art Of Marketing You
Post is included in group: Rainmaking - Internet Marketing Strategies
Post is included in group: Online Marketing Help Center
Post is included in group: Technology
Post is included in group: Active Rain Newbies

73 Comments on GeoZoodle.com Widgets: What Is My I.P. Address?

Karen, I did not find the post boring at all.  It sounds like the same reason that my GPS sometimes think I'm not even on a road (LOL). 

09/26/2007 12:06 PM by Marchel Peterson Spring TX Real Estate E-Pro ABR (Results Realty)


Marchel-- Did you see "I Love Texans" at the top of this post?  (And thanks for visiting my friend and oh-so-loyal reader.)

09/26/2007 12:09 PM by Arizona Home Loan


I am not a techie, but this didn't make my eyes glaze over! 

I am in Maryland and my widget says "District of Columbia" I am located in Silver Spring, Maryland, but it is less than a mile from the DC line,... So it's close enough!

09/26/2007 12:12 PM by Debbie Cook (Long & Foster Real Estate, Inc)


Karen,

Great post!!! When will the 'english version' be posted? Only kidding! Wish 1 finger Fran could understand all that c..p! Thanks

09/26/2007 12:12 PM by Fran 'The Title Man' Gaspari Title Insurance-PA & NJ (Patriot Land Transfer, Inc.)


Karen, I did see that and I LOVED IT!!  Texans love that stuff.  You would not believe how crazy people here go over the Texas star.  I have seen houses with it sprinkled clear through the house.

09/26/2007 12:12 PM by Marchel Peterson Spring TX Real Estate E-Pro ABR (Results Realty)


Debbie-- oh no!  I don't know if I knew the nickname for people from D.C.!  What does the "I LOVE" banner say at the top of this post for you?

09/26/2007 12:14 PM by Arizona Home Loan


Karen...I love this new little widget!  You are sooooooo talented!  Mine says I  Beating Heart NEVADANS!  Of course the heart on your widget doesn't poof out...I just put it there to make it as close to yours as I could!





09/26/2007 12:14 PM by Mary Warren (Referring Agent)


Mary-- can I steal that heart and add it to the widget?  Pretty please?

09/26/2007 12:18 PM by Arizona Home Loan


Karen...see my e-mail  Kisses 





09/26/2007 12:25 PM by Mary Warren (Referring Agent)


Hey Karen, great ideas.. I didn't realize that you were behind this when you posted about it prior. :) i like that! :)  have fun with your venture,.. i wiss you unlimited success with it. :)  let me know if you need a geek sometime! HA!

09/26/2007 12:25 PM by Nick M -Realtor®-Appraiser in West Palm- South Florida Real Estate Appraiser (Certified Residential Appraiser- West Palm Beach Real Estate)


Hey Karen,

I still have the original widget and it still works...thanks again!

09/26/2007 12:28 PM by Neal Bloom-Realtor ® Assoc.-CRS-Weston FL (RE/MAX Premier Associates)


Karen, I don't know how you do it! I might not have understood this post if I haven't been tagging along for the ride with your other posts. It makes perfect sense to me. 

BTW the mat says Ontario like it should and the widget at the top says " I love ! " which is fine with me. 

09/26/2007 12:29 PM by Wayne McMullan Quinte Real Estate (Royal LePage ProAlliance Realty)


Karen - Sorry to hear others are putting this down in other forums. I think this is an absolutely fantastic piece of technology. I have added it to my blog and moe importantly my website. Keep up the good work Karen!

09/26/2007 12:36 PM by Bill Gassett Metrowest Massachusetts Real Estate (RE/MAX Executive Realty)


Wayne-- check back in a second.  I am going to fix that.

09/26/2007 12:37 PM by Arizona Home Loan


Wayne-- how about now?

Bill--- thank you so much.  Jealousy abounds on AR and I just have to realize that some people don't know any better than to expose themselves as green.  Thank you for the kind words.

09/26/2007 12:39 PM by Arizona Home Loan


Karen,

The water is too warm not to jump in! Eastern or Western Pennsylvanians, Eagles or Steelers??? Thanks,   Fran

09/26/2007 12:41 PM by Fran 'The Title Man' Gaspari Title Insurance-PA & NJ (Patriot Land Transfer, Inc.)


Thanks Karen. I'm still awake. Good luck with your database.

09/26/2007 12:48 PM by Century 21 First Realty


Karen,

Thanks for the free widgets.  We've got one of them on our main website page and it seems to work fine.

I did try to use the widget in a Craigslist posting.  Unfortunately, the code does not seem to be accepted by the filters Craigslist uses, and only the default text appeared instead of the graphic.  If there is a cure for that.. another WOW!

John

09/26/2007 12:48 PM by Alexander-Slocum REMAX Real Estate Team - Vancouver WA Homes (RE/MAX equity group, inc. - Vancouver Washington)


John-- would you mind pointing me to the link (for the Craig's list ad) and maybe I can fix that up...  Or maybe you are right-- Craig's list simply does not allow users to add "iframes" to their site...  I'll know soon enough.  I am a servant of my friends on ActiveRain.

09/26/2007 12:53 PM by Arizona Home Loan


Karen....again...I can't say it enough...you are awesome!  I'm glad the bouncing heart worked!

09/26/2007 12:54 PM by Mary Warren (Referring Agent)


Mary, I can't say it enough:  Thank you, thank you, thank you.  I'm not really that "awesome."  When I went to business school, there was several "core concentrations" that I could have chosen.  You know: management, marketing, international business.  Honestly, I chose Management Information Systems (using databases for business purposes) because I thought that would be the easiest one.  International Business required speaking at least one other language.  So really, I tried to take the easy way out!  Don't give me too much credit!

09/26/2007 12:58 PM by Arizona Home Loan


mine says :

  North Carolinians!

How cool is that-- you absolutely amaze me with this stuff, its a foreign language to me but you always have a way of making me atleast get the concept!!!

09/26/2007 01:04 PM by Michele Connors, Broker in Charge (Coldwell Banker First Realty Morehead City)


Karen - absolutely wonderful stuff.  I sent an email for my widget.  Thank you.


 

09/26/2007 01:16 PM by Mike Mueller (Mike Mueller, Inc.)


Karen - Don't know why people would be negative - think they must have too much time on their hands.....I mean really get a life. Thanks for the explanation - I had left a comment before that I see Michigan instead of Connecticut, at least now I know why.

 

09/26/2007 01:21 PM by Guilford Connecticut Real Estate Agent, Sandra Cummings (William Raveis Real Estate)


Sandra-- please stick with me.  I will fix it very shortly.  I might even have it done today...maybe in a couple of days.  I want this to work for everybody.

09/26/2007 01:23 PM by Arizona Home Loan


Hi Karen, interesting little piece, not sure how I would use it yet, but there is always something it could be used for in my stuff.

I have put together a post which I am sure you can relate to as well.  It is a plea to end the mortgage guaranty limits placed on Fannie Mae or Friedy Mac a few years back by our forward thinking congress. http://www.realestatewebmasters.com/blogs/james-boyer/2852/show/

Please check it out, comment on it if you like, and if you agree please let your senators and representative know your feelings.

 

Jim

09/26/2007 01:26 PM by New Jersey Real Estate James Boyer Morris, Essex & Union County NJ Realtor (RE/MAX Properties Unlimited, Real Estate)


Karen:  Hello and I hope you are doing well.  Mine says I love Floridians and is working great.  Thank you.  Now how do I get that to come up on my blogs?  My welcome mat is working great already. 

09/26/2007 01:32 PM by Dianne Barody - Pensacola Florida Real Estate (Century 21 AmeriSouth Realty)


Karen, excellent program.  Mine works fine.  Thank you for all the innovative stuff!!!  Hope you are feeling better!!!!!

09/26/2007 01:33 PM by Chris Tesch College Station, Texas Real Estate (RE/MAX Bryan College Station)


Karen, fantastic! It looks great now. On behalf of all Canadians, thank-you.

09/26/2007 01:34 PM by Wayne McMullan Quinte Real Estate (Royal LePage ProAlliance Realty)


Karen- I missed the first round but will request the widget.  You continue to amaze me.

09/26/2007 02:04 PM by Jennifer Fivelsdal, Rhinebeck NY (Keller Williams Realty)


Karen, It worked for me in Alabama! It is so nice to be loved somewhere. I just wanted to let you know. It has worked great for me. I really like these. I am still trying to figure out the best placement for my other blogs. I can't wait to see what else you come up with it.

09/26/2007 02:20 PM by Birmingham Alabama Real Estate, Stephen Wolfe (LivingInBirmingham.com)


Karen, Your widgets are great,  I put widget 2 on my websites home page.  It is too bad some people are really negative.

Thanks

Steven.

09/26/2007 02:45 PM by Toronto Real Estate | Steven Campbell | Sales Representative (Homelife Victory Realty Inc., Brokerage*)


Karen,

The Heart thingy at the top of the post says I (heart) blank - nothing there

The widget is a picture of a doormat that says "WELCOME to all of my District of Columbia Visitors"

People from the area like to be called "Washingtonians".

09/26/2007 02:54 PM by Debbie Cook (Long & Foster Real Estate, Inc)


Another reason someone might not see the right location is if the person is connecting through a corporate firewall or proxy. A mortgage lender I work with in the Twin Cities always shows up as being located in Nebraska due to connecting to the internet through their corporate system and the main office is located there. 

Great job on the widgets! Can't wait to see more!

09/26/2007 02:57 PM by Jeff Scislow, CRS - RE/MAX Results (RE/MAX Results)


karen, Not a sleep and wide awake. I have installed your widget on my blog and get a few comments on how cool it is. You are awesome and just remember this world is unfortunately full of ignorant people so don't let their ignorant comments bother you.

09/26/2007 03:27 PM by Camarillo CA Real Estate Agent/ Mana Tulberg (Beach View Real Estate)


Ok Bob Carney is cracking me up up there!!!! These little widget "thingies" are pretty cool. The possibilities with this technology really are unlimited. Thanks for sharing Karen.

09/26/2007 04:09 PM by Bryant Tutas-Tutas Towne Realty, Inc


Karen, I love it!  You've got Florida right as mine says "Floridians".  Are you offering the code for this like you did the welcome mat?

09/26/2007 05:43 PM by Lake Mary & Orlando Real Estate, Central Florida, Christopher Myers (Orlando Property Group at Keller Williams)


  Brilliant Idea Karen, it made total sense to me! Data bases are always a work in progress!

09/26/2007 06:45 PM by Gilbert Arizona Real Estate - Candace Robinson (HomeSmart )


 

 

 

I'm just following along . . . it welcomes me from California and I'm in Northern Idaho.  Twice it's been from Cali and one from Washington State (more logical as I'm 10 miles from the WA border).

09/26/2007 06:48 PM by Coeur d'Alene Real Estate - Come Live the Life Style - Christina Ethridge (David Swarat's North Idaho Dream Team (GMAC))


Now that's very weird Christina...  To get all of those different ones?  Makes no sense!  Unless your company uses some type of sophisticated proxy server that changes locations for some reason.  Wow.  I'll admit:  This one really stumps me.

09/26/2007 06:51 PM by Arizona Home Loan


Karen - I thought it ODD too - as usually these IP things are only off by a small amount (ie, my IP being from Spokane WA and I'm in Coeur d'Alene ID, it's common in our market).  But, the CA thing is strange.  I'm at my home and our service is provided by Time Warner (formerly adelphia).  I can NOT imagine TW using anything 'sophisticated' for basic residential internet service!!  FWIW, the IP it is showing me is not the IP showing on my computer . . . even stranger??

09/26/2007 07:00 PM by Coeur d'Alene Real Estate - Come Live the Life Style - Christina Ethridge (David Swarat's North Idaho Dream Team (GMAC))


Yes.  Super-mega strange.  Can you do me a favor?  Look at the I.P. address that I display for you in red.

Then go to http://www.whatismyip.com/ 

And see if they are the same.  Because-- I'll tell you-- this website and the one that I just told you will give you the proper I.P. RIGHT NOW.

The question is what will your I.P. be at home?  Or when it says California?  Very weird!

09/26/2007 07:29 PM by Arizona Home Loan


The IP above and the IP on the website are the same - but not the same as the one displayed on my computer.  Maybe mine is a 'mask' or whatever.  It's still a mystery...  hey, at times I'd love to be in Cali, especially somewhere along the southern coast . . . 

09/26/2007 08:20 PM by Coeur d'Alene Real Estate - Come Live the Life Style - Christina Ethridge (David Swarat's North Idaho Dream Team (GMAC))


Hey I am still awake and my eyes did'nt glaze over. My widget worked great until a few days ago, now it only says "Welcome to Texas"

09/26/2007 08:27 PM by Rob Baldwin, Santa Clarita REALTOR® (SCV Home Buyer)


Hi, Karen!  My welcome mat has been working and on my sidebar for awhile now.  It says I 'heart' Illinoians when I opened this blog.  Looking forward to your new website.  Thanks for all that you do and I'm glad to see you blogging again.

09/26/2007 09:11 PM by Yolanda Hoversten Broker Associate - O'Fallon IL Real Estate & Relocation (Prudential One Realty Centre)


Karen - Mine works as did the first one! I have been using my mat - thank you! I can't wait to see the finished product and will be first in line to order.

09/26/2007 09:23 PM by Indianapolis Real Estate | Paula Henry (ReMax Excel)


Karen,

Thanks for answering my question about the mat displaying a different city and state than where I actually live.  I can't wait to see your other ideas :)  

09/26/2007 10:53 PM by Christi Stewart, Prudential Calif. Realty (Prudential California Realty)


Karen - great post and not boring.  I want a widget for MA....pretty please?

Jackie

PS) I'm especially fond of that poofy heart I saw up above...hint, hint

09/26/2007 11:17 PM by Jackie Peraza, Home Stager - Framingham, Massachusetts (Perceptions AdverStaging(TM), LLC)


Fantastic information, How do I access my code to paste the code in.  That seems to be my biggest barrier right now.. where do i paste the code to get the widgets on my active rain page? I ha e seen the most fantastic widgets and I am beginning to feel that they are all rather inaccessible, at least to me.

09/26/2007 11:53 PM by CJ Walton, CNE (Keller Williams Realty)


Hey Karen,

Cool - Now it says .  .  .  I (heart) Washingtonians!

Thanks

09/27/2007 08:49 AM by Debbie Cook (Long & Foster Real Estate, Inc)


Your widget works fine for me!  Thank you - can't wait to see your site launch.  You are so generous with your time & talents.  May all that you give come back to you many times over! 

09/27/2007 08:52 AM by Ann Jara, e-PRO, TRC (Quail Ridge Country Club Realty, Inc.)


Hello Karen,

Here is an example Craigslist Ad (expires on 10/4) where the Widget does not work.  The widget is placed below the e-mail gif near the bottom of the post.  It doesn't surprise me however, as CL has been very finicky with what they'll allow and not allow (i.e., they won't allow: white letters, red letters, java, too many links, too much HTML, etc. in my posts).

Here is an example of a Localism posted listing where the Widget does work (may need a transparent background, though).  Note that the ending HTML comment was not ignored by the AR HTML interface.

Both postings were created with MS FrontPage from a Template I created that was previously acceptable to Craigslist.  Since June 22, CL has reduced the amount of links and HTML in their posts thus, the difference in the two examples provided here.

I hope these examples are useful as you fine-tune these AWESOME Widgets!

John

09/27/2007 11:32 AM by Alexander-Slocum REMAX Real Estate Team - Vancouver WA Homes (RE/MAX equity group, inc. - Vancouver Washington)


Karen,

I get odd results once in a while for this widget and on the AR home page.  The AR home page shows the top people in your state.  Once in a while (like this evening) both of these think I am in Ohio instead of North Carolina. 

09/27/2007 08:22 PM by Rita Taylor | Sanford NC Real Estate & Homes for Sale in Sanford North Carolina (Strother Real Estate)


Karen - Love it, love you! Looking forward to ANYTHING you bring to the table in the near or distant future.  My welcome mat is getting a lot of traffic, might have to start leaving the shoes outside! LOL! :-)

09/30/2007 10:12 AM by Brad Andersohn ~ Community Builder (ActiveRain)


Karen,   You are so amazing!!  I can't wait to see GeoZoodle.  I am not asleep after reading this post, my mind is now on super drive....what will you have next?  I will try to do this welcome mat, however, I admit I am not a real wizard (yet) so I may have to write to you and Brad (remember Brad you offered to help me) to get through the welcome mat installation.  I will work at this after Monday, I am out of town in a country location with limited connection.  Karen, You Inspire Me!

09/30/2007 02:06 PM by Pat Hommel Annapolis, AA Co., Md. Real Estate Sales (Annapolis Plaza CB Residential and Commercial )


Hi Karen:

 

Enjoyed this too. It was techie at the end but that is ok, my wife says I have that glazed eye look all the time anyway.

10/02/2007 04:05 PM by Alan Kirkpatrick Austin Texas Real Estate (Austin Texas Homes)


Karen - LOL - I'm obviously confusing the Welcome Mat because everywhere I go it' says welcome to our GEORGIA vistors - I thought - why is everyone welcoming Georgia visitors - what did I miss - obviously alot.

So how do you get this widget? I wanna play too!!!(Only if I'm not too late)

You are one smart ladie - even with all those tumors in your brain - see if people bad mouth you you can now say - I can out think YOU with 9 tumors in my brain - ok, I hope I know you well enough to joke about it girlfriend to girlfriend (:-) - no offense intended. Just feeling spunky like old times.

10/02/2007 11:10 PM by Clearwater Real Estate Pinellas Florida Condos & Homes for Sale- Cyndee Haydon (Charles Rutenberg Realty)


Hi Cyndee--

You know that I can't be offended!  I am about << THIS >> close to fixing it so it says "Florida" for you and not Georgia.  Very close now...

Good to "see" you again!

Karen

10/03/2007 01:59 PM by Arizona Home Loan


Hey Girl - LOL - Now I'm a New Jersey Visitor - which would probalby be true for the snow birds here :-) - You're a better woman than me to be playing with all that code - I have my CIS degree but am happy to have friends like you be the expert!!! :-)  

10/05/2007 10:37 PM by Clearwater Real Estate Pinellas Florida Condos & Homes for Sale- Cyndee Haydon (Charles Rutenberg Realty)


Hi Karen - I hope you are well! I just noticed that your geozoodle is not working on my site or yours for that matter. Is there something wrong with it? Thought you should know.

10/23/2007 02:43 PM by Bill Gassett Metrowest Massachusetts Real Estate (RE/MAX Executive Realty)


Oh ya one other thing - How do I make it to your link list :)

10/23/2007 02:45 PM by Bill Gassett Metrowest Massachusetts Real Estate (RE/MAX Executive Realty)


Hi Karen...How's your Project coming, we're all keen to see and support your New Baby in 2008!

HAPPY NEW YEAR!

12/31/2007 12:41 AM by Fred Carver Victoria BC Realtor Find Quality Victoria Homes For Sale (Re/Max Camosun Victoria Real Estate)


The top of the page says  "I Love Marylanders"  but I am from Pennsylvania.

04/28/2008 10:15 AM by Karen Lauler


to find your ip address visit   www.what-is-my-ip-address.net

09/21/2008 09:32 PM by devdaslover


I love it! No more muddy footprints on my website! I can't wait to install it, hope it works on my site! Thank you very much!

09/25/2008 07:50 PM by Mark Brian (Silver Star Real Estate LLC)


Most of the blog widgets, Myspace layouts, and Myspace backgrounds out there are pretty junky. We think the danasoft graphic is a much more stylish way to jazz up your Myspace profile, your blog, or your website, and there's no better way to freak people out and make them think that you are publishing their private info.

<a href="http://pinayspeak.com">busby seo test</a>

10/02/2008 03:54 AM by pinayspeak


Keep it up, your doing fine. Nothing that is worth it is easy.

Richard

10/02/2008 07:48 AM by Richard Stabile Bergen County New Homes Builder Realtor (REMAX real estate associates)


<?php


$vars = explode('|',$_COOKIE['geouser']);
foreach($vars AS $value)
 {
       $value = explode('=', $value);
       $$value[0]=$value[1];
}

 

 

$DatabaseServer = "localhost";
$Username = "geozoodl_ben";
$Password = "98almaknotXYZ";
$DatabaseName = "geozoodl_ip2location";
 
$link = mysql_connect($DatabaseServer, $Username, $Password) or die('Could not connect: ' . mysql_error());

mysql_select_db($DatabaseName) or die('Could not select database');
   


if (getenv(HTTP_X_FORWARDED_FOR)) {
      $ip   = getenv('HTTP_X_FORWARD_FOR');
      $host = gethostbyaddr($ip);
    } else {
      $ip   = getenv('REMOTE_ADDR');
      $host = gethostbyaddr($ip);
   }

 

 $tmp = explode(".", $ip);

            $w = (16777216 * $tmp[0]);
            $x = (65536 * $tmp[1]);
            $y = (256 * $tmp[2]);
            $z = $tmp[3];

            $ipno =  $w+ $x + $y + $z;

$query = "SELECT * FROM ipcitylatlongzip WHERE $ipno <= endIpNum AND $ipno >= startIpNum";

$result = mysql_query($query) or die("IP2Location Query Failed");

// Retrieve the recordset (only one)

$row = mysql_fetch_object($result);

// got my row of data

 

 

//assign variables to field names
$country = $row->country;
$abcountry = $row->countryShort;
$cityname = $row->city;
$countrylong = $row->country;
$latitude = $row->latitude;
$longitude = $row->longitude;
$zipcode = $row->zipcode;
$state = $row->region;
$fullstate = $row->region;


//capitalize State
$fullstate = strtolower($fullstate);
$fullstate = substr_replace($fullstate, strtoupper(substr($fullstate, 0, 1)), 0, 1);

//capitalize city

$cityname = ucwords(strtolower($cityname));

//capitalize country
$countrylong = ucwords(strtolower($countrylong));

 


?>

 

----

when i clicked at the link to visit geozoodle.com

in the header part I show all the PHP code of the mysql_fetch_object() function

you need to fix that also your connection to the database ... write a dbconnect.php file and include it

so the credentials are not exposed

 ---

also for the above code to disappear from the header part you need to save the index.html as index.php

10/04/2008 03:04 PM by PalmHomes LLC


I found that this website http://www.maxmind.com/

has reliable database for IP address fir sale

10/04/2008 03:07 PM by PalmHomes LLC


// Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /home/geozoodl/public_html/correct_info.php on line 36

fix also this  on line 36 of correct_info.php

 

10/04/2008 03:15 PM by PalmHomes LLC


also from some comment in the php.net site

Be careful using HTTP_X_FORWARDED_FOR in conditional statements collecting the IP address. Sometimes the user's LAN address will get forwarded, which of course is pretty worthless by itself.  

10/04/2008 03:38 PM by PalmHomes LLC


George--


Thanks a bunch.  I am using the Maxmind DB.  This is actually my wife's site (Geozoodle) and she passed away on Aug. 23.

I'm not very rich right now, with Karen passing away, but could I pay you to help me out with this?

Michael George

10/06/2008 11:59 AM by Arizona Home Loan