$vvalue) { $$vname=$vvalue; } foreach($_GET as $vname => $vvalue) { $$vname=$vvalue; } include('language/lg_de.php'); if($showhits>=2) $st_show1="hits >=$showhits"; else $st_show1=""; if (isset($datei)) $url1="&datei=$datei"; else $url1=""; if ($_GET['action']) $url2="&action=".$_GET['action']; else $url2=""; $en_url="language=en".$url1.$url2; $de_url="language=de".$url1.$url2; $de_url=utf8_encode($de_url); $en_url=utf8_encode($en_url); if (!isset($datei)) { echo << $st_st $yourhost
END; if($_GET['language']) $set_lg="&language=$_GET[language]"; $ar_txtfiles=array(); $verz=opendir("./dat/"); while ($file = readdir ($verz)) { if(($file!=".") and ($file!="..")) { array_push($ar_txtfiles,$file); } } arsort($ar_txtfiles); foreach($ar_txtfiles as $key) { $datname=eregi_replace(".txt","",$key); $stat_urlteil="datei=$key".$set_lg; $stat_urlteil=utf8_encode($stat_urlteil); echo ""; } echo "
$st_st      $yourhost
$st_month
$datname$st_query
"; } if (isset($datei)) // alles bis ende { $anzeigemonat=eregi_replace("-"," ",$datei); $anzeigemonat=eregi_replace(".txt"," ",$anzeigemonat); //$anzeigemonat=eregi_replace("^([0-9]{4,4}) ([0-9]{2,2})(.*)","\\1/\\2",$anzeigemonat); $monate_de=array("/januar/","/februar/","/maerz/","/april/","/mai/","/juni/","/juli/","/august/","/september/","/oktober/","/november/","/dezember/"); $monate_en=array("/january/","/february/","/march/","/april/","/may/","/june/","/july/","/august/","/september/","/october/","/november/","/december/"); if ($language=="de") $anzeigemonat = preg_replace($monate_en, $monate_de, $anzeigemonat); if ($language=="en") $anzeigemonat = preg_replace($monate_de, $monate_en, $anzeigemonat); $anzeigemonat= preg_replace("/\//","", $anzeigemonat); $anzeigemonat=eregi_replace("^([0-9]{4,4})( )([0-9]{2,2})( )(.*)","\\5  \\1",$anzeigemonat); echo << $st_st - $anzeigemonat END; $width=400; echo << $st_st      $yourhost $anzeigemonat $st_to
$st_wait
END; if($_GET['language']) $set_lg="&language=$_GET[language]"; $stat_seiten_url=utf8_encode("datei=$datei&action=seiten$set_lg"); $stat_hosts_url=utf8_encode("datei=$datei&action=hosts$set_lg"); $stat_referer_url=utf8_encode("datei=$datei&action=referer$set_lg"); $stat_wochentag_url=utf8_encode("datei=$datei&action=wochentag$set_lg"); $stat_stunden_url=utf8_encode("datei=$datei&action=stunden$set_lg"); $stat_land_url=utf8_encode("datei=$datei&action=land$set_lg"); $stat_suche_url=utf8_encode("datei=$datei&action=suchbegriffe$set_lg"); $stat_tage_url=utf8_encode("datei=$datei&action=tage$set_lg"); $stat_direkte_url=utf8_encode("datei=$datei&action=direkte$set_lg"); $stat_browser_url=utf8_encode("datei=$datei&action=browser$set_lg"); echo <<$st_hint
  $st_days $st_sites $st_direct $st_ref $st_search* $st_week $st_hours $st_hosts $st_country $st_brows*  

END; $datei="./dat/".$datei; $fp = fopen ("$datei", "r") or die("Can't open $datei"); // $zeit = filemtime($datei); // $ar_wochentag=array(); $ar_datum=array(); $ar_zeit=array(); $ar_stunde=array(); $ar_ip=array(); $ar_hosts=array(); $ar_land=array(); $ar_seiten=array(); $ar_referer=array(); $ar_direkt=array(); $ar_suchbegriffe_a=array(); $ar_einzelneworte=array(); $ar_browser=array(); $total=0; if (isset($action) AND $action=="suchbegriffe") { include ("suche.php"); exit; } while($zeile = fgets($fp,1500)) { if (!eregi("-",$zeile)) continue; //echo "$zeile
"; $daten=explode(" - ",$zeile); //echo "$daten[0]
"; $tag=explode(", ",$daten[0]); // in Tagname und datum splitten //echo "$tag[0]-$tag[1]
"; // tage mit preg_replace auf die sprache angepassen $tage_de=array("/Sonntag/","/Montag/","/Dienstag/","/Mittwoch/","/Donnerstag/","/Freitag/","/Samstag/"); $tage_en=array("/Sunday/","/Monday/","/Tuesday/","/Wednesday/","/Thursday/","/Friday/","/Saturday/"); if ($language=="de") $tag = preg_replace($tage_en, $tage_de, $tag); if ($language=="en") $tag = preg_replace($tage_de, $tage_en, $tag); $tag= preg_replace("/\//","", $tag); array_push($ar_wochentag,$tag[0]); array_push($ar_datum,"$tag[1]=>$tag[0]"); $tageszeit=explode(":",$daten[1]); array_push($ar_stunde,$tageszeit[0]); //array_push($ar_zeit,$daten[1]); //$datum=$daten[0]; //$zeit=$daten[1]; $ip=$daten[2]; //remote hosts $host=$daten[3]; $host=strtolower($host); if (eregi("([_a-z0-9-]*\.[a-z]{2,4}$)",$host,$regs)) { $hostname=$regs[0]; array_push($ar_hosts,$hostname); } elseif ($host=="localhost") { array_push($ar_hosts,"localhost"); } else { array_push($ar_hosts,"IP only"); } // seiten $seite=$daten[6]; if (isset($action) AND $action=="seiten") { If (eregi("$yourhost",$seite)) { $seite=eregi_replace("http:\/\/","",$seite); $seite=eregi_replace("www\.","",$seite); $seite=eregi_replace("$yourhost","",$seite); } $seite=trim($seite); $seite=eregi_replace("^\/","",$seite); $seite=eregi_replace("\/$","/$indexsite",$seite); $seite=eregi_replace("^((index\.(html|htm|php))|\/)$","$indexsite",$seite); $seite=eregi_replace("\/((index\.(html|htm|php))|\/)$","/$indexsite",$seite); if(empty($seite)) $seite="$indexsite"; if($seite=="INDEX") $seite="$indexsite"; array_push($ar_seiten,$seite); } //land //$host=$daten[3]; if (eregi("(\.[a-z]{2,4}$)",$host,$regs)) { $land=$regs[0]; $land=eregi_replace("\.","",$land); if (isset($action) and $action=="land") { array_push($ar_land,$land); } } else { $land="Land unbekannt"; if (isset($action) and $action=="land") { array_push($ar_land,"not known"); } } // referer $referer=$daten[5]; if (isset($action) AND ($action=="referer" or $action=="direkte") ) { if(($referer=="") or ($referer==" ")) { array_push($ar_referer,"no referer"); if ($action=="direkte") { array_push($ar_direkt,"$seite=>$land"); } } else { $referer=eregi_replace("(http://$yourhost/$|http://www.$yourhost/$)","./index",$referer); $referer=eregi_replace("(http://$yourhost/|http://www.$yourhost/)","./",$referer); if(strlen($referer)>=70) $referer=substr($referer, 0, 70)."..."; array_push($ar_referer,$referer); } if (eregi("\?",$referer,$regsu)) { array_push($ar_suchbegriffe_a,$referer); } } // if (isset($action) AND ($action=="browser") ) { include("browsercodes.php"); foreach ($browsercode as $item => $teil2) { if (eregi("$item",$daten[4],$reg)) { //echo "$item found
"; $teil3=explode("|",$teil2); $tname=$teil3[0]; //echo "name: $tname
"; If(!empty($teil3[1])) $tversion=$reg[$teil3[1]]; else $tversion=""; //echo "version: $tversion
"; $browser=$tname.$tversion; break; } else $browser="unkown"; } array_push($ar_browser,$browser); } // $total++; } fclose($fp); //Hits pro Tag if ( (isset($action) AND $action=="tage") or (!isset($action)) ) { include("tage.php"); } //hits pro seite if (isset($action) AND $action=="seiten") { include("seiten.php"); } //referer und suchbegriffe vorarbeit if (isset($action) AND $action=="referer") // ($action=="referer" or $action=="suchbegriffe")) { $suchbegriffe=array(); $refsuche=array(); $pur_referer=array(); $refcount=0; //while(list($key, $val) = each($zaehlereferer)) foreach($ar_referer as $key) { $schritte++; // referer auf suchmaschinen untersuchen if (eregi("\?",$key,$reg)) { $purref=explode("?",$key); $purref2=eregi_replace("([_a-z0-9-]*\.[a-z]{2,4})(\/.*$)","\\1",$purref[0]); $purref2=trim($purref2); array_push($pur_referer,$purref2); $refcount++; } else { $key=eregi_replace("([_a-z0-9-]*\.[a-z]{2,4})(\/.*$)","\\1",$key); $key=trim($key); array_push($pur_referer,$key); $refcount++; } } } // ende if action // Hits pro Referer if (isset($action) AND $action=="referer") { include ("./referer.php"); } // Hits pro Wochentag if (isset($action) AND $action=="wochentag") { include("wochentag.php"); } // hits pro stunde if (isset($action) AND $action=="stunden") { include("stunden.php"); } // hosts if (isset($action) AND $action=="hosts") { include("./hosts.php"); } //$ccodes =array(); $ccodes = array( "de" => "Germany", "net" => "Network", "org" => "Non-Profit Organization", "com" => "US Commercial", "Land unbekannt" => "Land unbekannt", "ad" => "Andorra", "ae" => "United Arab Emirates", "af" => "Afghanistan", "ag" => "Antigua and Barbuda", "ai" => "Anguilla", "al" => "Albania", "am" => "Armenia", "an" => "Netherlands Antilles", "ao" => "Angola", "aq" => "Antarctica", "ar" => "Argentina", "as" => "American Samoa", "at" => "Austria", "au" => "Australia", "aw" => "Aruba", "az" => "Azerbaijan", "ba" => "Bosnia Herzegovina", "bb" => "Barbados", "bd" => "Bangladesh", "be" => "Belgium", "bf" => "Burkina Faso", "bg" => "Bulgaria", "bh" => "Bahrain", "bi" => "Burundi", "bj" => "Benin", "bm" => "Bermuda", "bn" => "Brunei Darussalam", "bo" => "Bolivia", "br" => "Brazil", "bs" => "Bahamas", "bt" => "Bhutan", "bv" => "Bouvet Island", "bw" => "Botswana", "by" => "Belarus", "bz" => "Belize", "ca" => "Canada", "cc" => "Cocos (Keeling) Islands", "cf" => "Central African Republic", "cg" => "Congo", "ch" => "Switzerland", "ci" => "Cote DIvoire", "ck" => "Cook Islands", "cl" => "Chile", "cm" => "Cameroon", "cn" => "China", "co" => "Colombia", "cr" => "Costa Rica", "cs" => "Czechoslovakia", "cu" => "Cuba", "cv" => "Cape Verde", "cx" => "Christmas Island", "cy" => "Cyprus", "cz" => "Czech Republic", "dj" => "Djibouti", "dk" => "Denmark", "dm" => "Dominica", "do" => "Dominican Republic", "dz" => "Algeria", "ec" => "Ecuador", "ee" => "Estonia", "eg" => "Egypt", "eh" => "Western Sahara", "er" => "Eritrea", "es" => "Spain", "et" => "Ethiopia", "fi" => "Finland", "fj" => "Fiji", "fk" => "Falkland Islands (Malvinas)", "fm" => "Micronesia", "fo" => "Faroe Islands", "fr" => "France", "fx" => "France (Metropolitan)", "ga" => "Gabon", "gb" => "Great Britain (UK)", "gd" => "Grenada", "ge" => "Georgia", "gf" => "French Guiana", "gh" => "Ghana", "gi" => "Gibraltar", "gl" => "Greenland", "gm" => "Gambia", "gn" => "Guinea", "gp" => "Guadeloupe", "gq" => "Equatorial Guinea", "gr" => "Greece", "gs" => "S. Georgia and S. Sandwich Islands", "gt" => "Guatemala", "gu" => "Guam", "gw" => "Guinea-Bissau", "gy" => "Guyana", "hk" => "Hong Kong", "hm" => "Heard and McDonald Islands", "hn" => "Honduras", "hr" => "Croatia (Hrvatska)", "ht" => "Haiti", "hu" => "Hungary", "id" => "Indonesia", "ie" => "Ireland", "il" => "Israel", "in" => "India", "io" => "British Indian Ocean Territory", "iq" => "Iraq", "ir" => "Iran", "is" => "Iceland", "it" => "Italy", "jm" => "Jamaica", "jo" => "Jordan", "jp" => "Japan", "ke" => "Kenya", "kg" => "Kyrgyzstan", "kh" => "Cambodia", "ki" => "Kiribati", "km" => "Comoros", "kn" => "Saint Kitts and Nevis", "kp" => "North Korea", "kr" => "South Korea", "kw" => "Kuwait", "ky" => "Cayman Islands", "kz" => "Kazakhstan", "la" => "Laos", "lb" => "Lebanon", "lc" => "Saint Lucia", "li" => "Liechtenstein", "lk" => "Sri Lanka", "lr" => "Liberia", "ls" => "Lesotho", "lt" => "Lithuania", "lu" => "Luxembourg", "lv" => "Latvia", "ly" => "Libya", "ma" => "Morocco", "mc" => "Monaco", "md" => "Moldova", "mg" => "Madagascar", "mh" => "Marshall Islands", "mk" => "Macedonia", "ml" => "Mali", "mm" => "Myanmar", "mn" => "Mongolia", "mo" => "Macau", "mp" => "Northern Mariana Islands", "mq" => "Martinique", "mr" => "Mauritania", "ms" => "Montserrat", "mt" => "Malta", "mu" => "Mauritius", "mv" => "Maldives", "mw" => "Malawi", "mx" => "Mexico", "my" => "Malaysia", "mz" => "Mozambique", "na" => "Namibia", "nc" => "New Caledonia", "ne" => "Niger", "nf" => "Norfolk Island", "ng" => "Nigeria", "ni" => "Nicaragua", "nl" => "Netherlands", "no" => "Norway", "np" => "Nepal", "nr" => "Nauru", "nt" => "Neutral Zone", "nu" => "Niue", "nz" => "New Zealand (Aotearoa)", "om" => "Oman", "pa" => "Panama", "pe" => "Peru", "pf" => "French Polynesia", "pg" => "Papua New Guinea", "ph" => "Philippines", "pk" => "Pakistan", "pl" => "Poland", "pm" => "St. Pierre and Miquelon", "pn" => "Pitcairn", "pr" => "Puerto Rico", "pt" => "Portugal", "pw" => "Palau", "py" => "Paraguay", "qa" => "Qatar", "re" => "Reunion", "ro" => "Romania", "ru" => "Russian Federation", "rw" => "Rwanda", "sa" => "Saudi Arabia", "sb" => "Solomon Islands", "sc" => "Seychelles", "sd" => "Sudan", "se" => "Sweden", "sg" => "Singapore", "sh" => "St. Helena", "si" => "Slovenia", "sj" => "Svalbard and Jan Mayen Islands", "sk" => "Slovak Republic", "sl" => "Sierra Leone", "sm" => "San Marino", "sn" => "Senegal", "so" => "Somalia", "sr" => "Suriname", "st" => "Sao Tome and Principe", "su" => "USSR (Former)", "sv" => "El Salvador", "sy" => "Syria", "sz" => "Swaziland", "tc" => "Turks and Caicos Islands", "td" => "Chad", "tf" => "French Southern Territories", "tg" => "Togo", "th" => "Thailand", "tj" => "Tajikistan", "tk" => "Tokelau", "tm" => "Turkmenistan", "tn" => "Tunisia", "to" => "Tonga", "tp" => "East Timor", "tr" => "Turkey", "tt" => "Trinidad and Tobago", "tv" => "Tuvalu", "tw" => "Taiwan", "tz" => "Tanzania", "ua" => "Ukraine", "ug" => "Uganda", "uk" => "United Kingdom", "um" => "US Minor Outlying Islands", "us" => "United States", "uy" => "Uruguay", "uz" => "Uzbekistan", "va" => "Vatican City State (Holy See)", "vc" => "Saint Vincent and the Grenadines", "ve" => "Venezuela", "vg" => "Virgin Islands (British)", "vi" => "Virgin Islands (US)", "vn" => "Vietnam", "vu" => "Vanuatu", "wf" => "Wallis and Futuna Islands", "ws" => "Samoa", "ye" => "Yemen", "yt" => "Mayotte", "yu" => "Yugoslavia", "za" => "South Africa", "zm" => "Zambia", "zr" => "Zaire", "zw" => "Zimbabwe", "edu" => "US Educational", "gov" => "US Government", "int" => "International", "mil" => "US Military", "arpa" => "Old-Style Arpanet", "nato" => "NATO Field" ); //hits pro land if (isset($action) AND $action=="land") { include("land.php"); } ////////////////////////////////////////////////////// // direkte Aufrufe if (isset($action) AND $action=="direkte") { include("direkte.php"); } // Browser if (isset($action) AND $action=="browser") { include("browser.php"); } ///////////////////////////////////////////////////// } // ende if isset $datei ?>

BaCounter v2.4 Copyright by B.A.