|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hello all
I have a simple feedback form, from there the user inputs are getting stored in Mysql database.But I want to track my visitors IP location along with other inputs and store it into database as well. How to do it? A ny help or tutorial would be appreciable. Thanks in advance-
__________________
Developersouvik [Technology & creativity Spun together] http://developersouvik.orgfree.com Last edited by subho; 06-03-2009 at 03:14 AM. |
|
|||
|
You can follow Wige's advice and store the IP as a string (text). I prefer storing the IP address in decimal (integer) as it makes it easier to work with later.
I wrote a tutorial called Decimal and Binary Conversion of IP Addresses. But you can use MySQL commands to easily convert the data. For instance if you retrieved the IP you can use the inet_aton('$ip') command to convert the insert the IP Address ($ip) into decimal and then add the data into the database. You can convert the Decimal Address back to octets by using inet_ntoa.
__________________
I use Country IP Blocks as added security for my networks and servers. Last edited by Tech Manager; 06-03-2009 at 05:24 PM. |
|
|||
|
|
|
||||
|
Quote:
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MYSQL Database Query | Gracey | Database Discussion Forum | 3 | 03-30-2009 10:37 AM |
| i am new to mySQL Database | AndrewB | Database Discussion Forum | 9 | 09-04-2007 02:42 PM |
| Images in a MySQL Database | madmanlear | Web Programming Discussion Forum | 2 | 03-14-2007 07:15 PM |
| My MySQL Database Problem | jazzmatazz2005 | Database Discussion Forum | 19 | 12-07-2005 09:56 AM |
| Setting up a MySQL Database | danielle v2.1b | Database Discussion Forum | 11 | 02-05-2004 10:07 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |