Advertisement
Sonic3R

Untitled

Jul 17th, 2011
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. $ip_actual = $_SERVER['REMOTE_ADDR'];
  2.  
  3.  
  4.     $view1=mysql_query("SELECT * FROM ip_address where ip='".$ip_actual."'") or die(mysql_error());
  5. while($info=mysql_fetch_array($view1))
  6. {
  7.     if($ip_actual==$info['ip'])
  8.     {
  9.         $tries=$info['tries'];
  10.         $today = getdate();
  11.         $date_now = $today['year']."-".$today['mon']."-".$today['mday'];
  12.         $date_now = date("Y-m-d",strtotime($date_now));
  13.         $date_expire = $info['data_expirare'];
  14.         if(($date_now==$date_expire) and ($tries==0)) {
  15.         $tries=2;
  16.         $tryagain=mysql_query("update ip_address set tries=2 where ip='".$ip_actual."'") or die(mysql_error());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement