paulman888888 Posted May 31, 2008 Share Posted May 31, 2008 can someone please tell me how to make a simple get IP address and store it in a Mysql database? Thankyou Link to comment https://forums.phpfreaks.com/topic/108154-solved-quick-question/ Share on other sites More sharing options...
Prismatic Posted May 31, 2008 Share Posted May 31, 2008 <?php if($_SERVER['HTTP_X_FORWARD_FOR']) { $ip = $_SERVER['HTTP_X_FORWARD_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } mysql_query("INSERT INTO ips (ip) VALUES ('{$ip}')"); ?> Link to comment https://forums.phpfreaks.com/topic/108154-solved-quick-question/#findComment-554415 Share on other sites More sharing options...
paulman888888 Posted May 31, 2008 Author Share Posted May 31, 2008 thankyou Link to comment https://forums.phpfreaks.com/topic/108154-solved-quick-question/#findComment-554418 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.