Sameer599 Posted December 6, 2009 Share Posted December 6, 2009 Hay, I would like to know how to log IPs into a MySQL database. thanks Link to comment https://forums.phpfreaks.com/topic/184159-logging-ips/ Share on other sites More sharing options...
JAY6390 Posted December 6, 2009 Share Posted December 6, 2009 Not really a regex question. You need to use $ip = $_SERVER['REMOTE_ADDR']; to get the ip, then connect to the db and insert it into a varchar field Link to comment https://forums.phpfreaks.com/topic/184159-logging-ips/#findComment-972285 Share on other sites More sharing options...
Sameer599 Posted December 6, 2009 Author Share Posted December 6, 2009 how to insert it? Link to comment https://forums.phpfreaks.com/topic/184159-logging-ips/#findComment-972287 Share on other sites More sharing options...
PFMaBiSmAd Posted December 6, 2009 Share Posted December 6, 2009 If you don't know how to perform basic queries to store and retrieve information in a database, your first step would be to read a php/mysql book or start checking out the tutorials posted all over the Internet. Here is one to get you started - http://w3schools.com/php/php_mysql_intro.asp Link to comment https://forums.phpfreaks.com/topic/184159-logging-ips/#findComment-972293 Share on other sites More sharing options...
Jnerocorp Posted December 6, 2009 Share Posted December 6, 2009 You can download this script if you want that i made http://mytestsite.rack111.com/counter/ it logs the ip's to a text file http://mytestsite.rack111.com/counter/ip.txt -John Link to comment https://forums.phpfreaks.com/topic/184159-logging-ips/#findComment-972298 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.