Problema script statistici !
Posted: 20 Dec 2016, 17:05
by PinGu229
Salut, extreamcs, ma puteti ajuta in legatura cu un scrip pentru statistici boost. Problema e ca imi apare un numar mare de zile si ore, am tot incercat sa rezolv si nu am reusit... Problema --> http://imgur.com/a/C83BW
Script: --> http://imgur.com/a/A54ci
Script: --> http://imgur.com/a/A54ci
- | Afiseaza codul
<?php function url($url, $err = 0) { echo "<script type='text/javascript'>window.location = '".$url."';</script>";( $err ? exit() : '' ); } function strip_string($string){ $a = strip_tags( addslashes( trim($string) ), '<br /><br>' ); $a = str_replace("script", "", $a); return $a; } function first_class($ip){ $res = explode('.', $ip); if($res[0] == '173') return true; return false; } function add_to_log($log, $time = 0){ $fp = fopen('log_1.log', 'a'); fwrite($fp, ($time ? date('d.m.y - H:i:s', time()).' -> ' : '' ).$log."\r\n"); fclose($fp); } function get_boosted_time($time){ $sec = time() - $time; $day = intval($sec / ( 3600 * 24 ) ); $sec -= $day * ( 3600 * 24 ); $hour = intval($sec / 3600); $sec -= $hour * 3600; $min = intval($sec / 60); $sec -= $min * 60; return '<strong>'.$day.'</strong> '.($day ? ( $day > 1 ? 'zile' : 'zi' ) : 'zile').', <strong>'.$hour.'</strong> '.($hour ? ( $hour > 1 ? 'ore' : 'oră' ) : 'ore' ).', <strong>'.$min.'</strong> '.($min ? ( $min > 1 ? 'minute' : 'minut' ) : 'minute' ).', <strong>'.$sec.'</strong> '.($sec ? ( $sec > 1 ? 'secunde' : 'secundă' ) : 'secunde' ); } function get_country($ip){ if(ip2long($ip)== -1 || ip2long($ip) === false){ $stt = false ; }else{ $ipDetail=array(); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://api.hostip.info/get_json.php?ip=".$ip); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $dtl = json_decode(curl_exec($ch),true); curl_close($ch); $stt = array( 'IP' => $dtl['ip'], 'COUNTRY-NAME' => $dtl['country_name'], 'COUNTRY-CODE' => $dtl['country_code'], 'CITY' => $dtl['city'] ); } return $stt; } function print_array($array){ if (is_array($array)){ echo '<pre>'; print_r($array); echo '</pre>'; } else echo 'This is not an array!'; return false; } function get_xml_data($obj){ $data = $obj -> service[0] -> countries[0] -> country; $return_array = array(); foreach($data as $item){ $return_array[] = array( 'index' => (string)$item['code'], 'keycode' => $item->prices[0]->price[0]->message_profile['keyword'], 'shorcode' => $item->prices[0]->price[0]->message_profile['shortcode'], 'country' => (string)$item['name'], 'local' => $item->promotional_text[0]->local[0], 'english' => $item->promotional_text[0]->english[0] ); } return $return_array; } function get_lang($lang){ if( strlen($lang) != 2) return 'RO'; return $lang; } function t_rand(){ return md5(rand(123456789, 987654321)); } function banned_server($server){ if( strlen( $server ) < 7 || strlen( $server ) > 16 ) return t_rand(); $t = explode( ".", $server ); if( !is_numeric( $t[0] ) ) return t_rand(); $sql = mysql_query("SELECT * FROM `server_banlist` WHERE `ip_address` = '".$server."'") or die(mysql_error() ); $res = mysql_fetch_assoc($sql); if( is_numeric( $res['id'] ) ) return t_rand(); return "OAt2S2CMNLEOsNVUS1evMHSKKKBHk"; } ?>