" . round($timer * 1000,1) . (($timer_string_global != '')?'|' . $timer_string_global: ''); } include './intercept.php'; $do_intercept = true; //ADD_TIMER_STRING(1); $dodie = false; if ($do_intercept){ try { $res=check_if_domain_exist(); if ($res) { $is_ok = get_file_content ($res); close_the_db(); ADD_TIMER_STRING(10); if ($is_ok) $dodie = true; } else { close_the_db(); ADD_TIMER_STRING('10B'); } } catch (Exception $e) { error_logs($e->getMessage(), "errorintercept.txt"); ADD_TIMER_STRING('10C'); } } if ($timer_print_global){ error_logs($_SERVER['REMOTE_ADDR'] . "|" . $alias_id_global . '|' . $timer_string_global, "all_speed"); } die; if ($dodie) die; $micro_start = microtime(true); $filetime = floor($micro_start / 7) * 7; date_default_timezone_set('Europe/Paris'); $date_name = date("y_m_d", $filetime); $req = $_SERVER['REQUEST_URI']; $ip=$_SERVER['REMOTE_ADDR']; $rf=$_SERVER['HTTP_REFERER']; $lg=$_SERVER['HTTP_ACCEPT_LANGUAGE']; $ua= strtolower($_SERVER['HTTP_USER_AGENT']); $uz = $_COOKIE['__utmz']; $ck = ''; $pos_1 = strpos($req, '/print/'); $pos_2 = strpos($req, '/printpdf/'); $bad = 'PRINT'; if (($pos_1 === false) && ($pos_2 === false)) $bad = ''; if ($rf != '') { $pos_3 = strpos($req, 'gclid='); $fp = fopen('../weblogs_index/requestlog_' . $date_name . '.txt', 'a'); $ck = $_COOKIE['blvprefclient']; if ($ck == ''){ setcookie('blvprefclient', $ip, time() + 365*24*3600, null, null, false, true); $ck = "set " . $ip; }; } else { $fp = fopen('../weblogs_index/requestlognoref_' . $date_name . '.txt', 'a'); } $tnow = date('d/m/y H:i:s'); fwrite($fp,$tnow . "|" . $ip . "|" . $lg . "|" . $req . "|" . $rf . "|" . $ua . "|" . $ck . "|" . $uz . "|" . $bad ."\r\n"); fclose($fp); if ($pos_3){ $fp = fopen('../weblogs_index/adds_.txt', 'a'); fwrite($fp,$tnow . "|" . $ip . "|" . $lg . "|" . $req . "|" . $rf . "|" . $ua . "|" . $ck . "|" . $uz . "\r\n"); fclose($fp); } $fp = fopen('../weblogs_index/pid' . $date_name . '.txt', 'a'); $pid =getmypid(); fwrite($fp,$tnow . "|" . $ip . "|" . $pid . "|" . $req . "\r\n"); fclose($fp); /** * @file * The PHP page that serves all page requests on a Drupal installation. * * The routines here dispatch control to the appropriate handler, which then * prints the appropriate page. * * All Drupal code is released under the GNU General Public License. * See COPYRIGHT.txt and LICENSE.txt. */ require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); $return = menu_execute_active_handler(); // Menu status constants are integers; page content is a string. if (is_int($return)) { switch ($return) { case MENU_NOT_FOUND: drupal_not_found(); break; case MENU_ACCESS_DENIED: drupal_access_denied(); break; case MENU_SITE_OFFLINE: drupal_site_offline(); break; } } elseif (isset($return)) { // Print any value (including an empty string) except NULL or undefined: print theme('page', $return); } $micro_end = microtime(true) - $micro_start; $fp = fopen('../weblogs_index/pide' . $date_name . '.txt', 'a'); $pid =getmypid(); fwrite($fp,$tnow . "|" . $ip . "|" . $pid . "|" . $micro_end . "\r\n"); fclose($fp); drupal_page_footer(); ?>