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 Quote Link to comment 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}')"); ?> Quote Link to comment Share on other sites More sharing options...
paulman888888 Posted May 31, 2008 Author Share Posted May 31, 2008 thankyou Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.