Hey, I know the title is really bad…I didn’t know what else to say. Well anyways, I have a website that I want to track their ip and geo address ip, and found this snippet from CSS-Tricks, http://css-tricks.com/snippets/php/get-geo-ip-information/
I got that working, and the return was Array ( [domain] => dslb-094-219-040-096.pools.arcor-ip.net [country] => DE - Germany [state] => Hessen [town] => Fl�rsheim ).
I have made a table and want to disect that array and put city into one mysql row, country into another one, and domain into another one. Can anyone help me make a mysql insert that inserts all of these different datas into each corresponding mysql row?
Thanks for all help…I have just recently started learning php, so I am still quite of a beginner.
Since the geoCheckIP already returns an array (read more), you can do as follow:
And you would read each value like:
And a MySQL insert for this would be something like:
More on mysql_real_escape_string
More on php and mysql