ClocxHD

Untitled

Oct 30th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. $con=mysqli_connect("localhost","ip","ip","ip");
  4.  
  5. if (mysqli_connect_errno()) {
  6. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  7. }
  8.  
  9. if($ip) {
  10.  
  11. $eintragen = mysqli_query($con,"INSERT INTO `ip`(`ip`) VALUES ('$ip')");
  12. mysqli_close($con);
  13. }
  14.  
  15. $ip = getenv ("REMOTE_ADDR");
  16.  
  17. echo $_SERVER['REMOTE_ADDR'];
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment