Advertisement
Guest User

Untitled

a guest
Aug 5th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. $hostname = "localhost";
  2. $dbuser = "carl";
  3. $dbpassword = "jones1234.";
  4. $dbname = "ips";
  5.  
  6.  
  7. $con = mysql_connect($hostname,$dbuser,$dbpassword);
  8. if (!$con)
  9.   {
  10.   die('Could not connect: ' . mysql_error());
  11.   }
  12.  
  13. mysql_select_db($dbname, $con);
  14.  
  15. $thetime = $time();
  16.  
  17. $sql="INSERT INTO iptable (ip,datevisit) VALUES ('$ip','$thetime')";
  18.  
  19. if (!mysql_query($sql,$con))
  20.   {
  21.   die('Error: ' . mysql_error());
  22.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement