Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ip_actual = $_SERVER['REMOTE_ADDR'];
- $view1=mysql_query("SELECT * FROM ip_address where ip='".$ip_actual."'") or die(mysql_error());
- while($info=mysql_fetch_array($view1))
- {
- if($ip_actual==$info['ip'])
- {
- $tries=$info['tries'];
- $today = getdate();
- $date_now = $today['year']."-".$today['mon']."-".$today['mday'];
- $date_now = date("Y-m-d",strtotime($date_now));
- $date_expire = $info['data_expirare'];
- if(($date_now==$date_expire) and ($tries==0)) {
- $tries=2;
- $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