954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Ip logger

this is supposed to log the ip's of people connecting to my site but it wont work help?

<?php
$username="****";
$password="*****";
$database="ipconnect";
$ip=@$REMOTE_ADDR;
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO ip VALUES ('$ip')";
mysql_query($query);
mysql_close();
?>
Progr4mmer
Junior Poster
113 posts since Nov 2009
Reputation Points: 11
Solved Threads: 10
 

Line 5:

$ip = $_SERVER['REMOTE_ADDR'];
pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: