<?
###################################################################
## ##
## Модуль "VD counter" является многофункциональным счетчиком ##
## посетителей сайта. ##
## Автор: Администратор www.wmzshop.ru ##
## Страница автора: http://www.wmzshop.ru ##
## В случае проблем с установкой (или другие вопросы), можете ##
## обратиться по E-mail: [email protected] или ICQ: 221484848 ##
## ##
## ##
## ##
## ##
###################################################################
###################################################################
## ##
## ВНИМАНИЕ Любая модернизация файлов приведет к ##
## неработоспособности скрипта. Изменения в файлах ##
## возможны лишь с согласия автора. ##
## ##
###################################################################
$year=date("Y");
$mes=date("m");
$day=date("d");
$olday="mega";
$mrak=getcwd();
$machovs="$year/";
chdir($machovs);
$moy=date("H");
@$fp = fsockopen ("$HTTP_HOST", 80, $errno, $errstr, 1);
if (!$fp) {
exit;
}
else
{
fputs ($fp, "GET / HTTP/1.0\r\nHost: $HTTP_HOST\r\n\r\n");
while (!feof($fp)) {
@$data.= fgets ($fp,128);
}
fclose ($fp);
if(eregi("www.wmzshop.ru",$data))
{
//Проверяем наличие hitvs файлов Если нет то создаем.
$hitvsex=file_exists($olday.".hitvs");
if ($hitvsex!="true")
{
$fhitvs=fopen($olday.".hitvs","w+");
fwrite($fhitvs,0);
}
//если ява отключена то не выполнять
if ($js!="off")
{
//hitvs
$hitvsex=file_exists($olday.".hitvs");
if ($hitvsex=="true")
{
$hitvs=file($olday.".hitvs");
$hitvs[0]=$hitvs[0]+1;
$fhitvs=fopen($olday.".hitvs","w+");
fwrite($fhitvs,$hitvs[0]);
}
else
{
$fhitvs=fopen($olday.".hitvs","w+");
fwrite($fhitvs,1);
}
$macho="$mrak/$year/$mes/";
chdir($macho);
//Блок почасовой статистики для hit
$chex=file_exists($day.$moy.".hitch");
if ($chex=="true")
{
$ch=file($day.$moy.".hitch");
$ch[0]=$ch[0]+1;
$fch=fopen($day.$moy.".hitch","w+");
fwrite($fch,$ch[0]);
}
else
{
$fch=fopen($day.$moy.".hitch","w+");
fwrite($fch,1);
}
//конец временного блока для hit
$hitex=file_exists($day.".hit");
if ($hitex!="true")
{
$fhit=fopen($day.".hit","w+");
fwrite($fhit,0);
}
$hostex=file_exists($day.".host");
if ($hostex!="true")
{
$fhost=fopen($day.".host","w+");
fwrite($fhost,0);
}
//hit
$hitex=file_exists($day.".hit");
if ($hitex=="true")
{
$hit=file($day.".hit");
$hit[0]=$hit[0]+1;
$fhit=fopen($day.".hit","w+");
fwrite($fhit,$hit[0]);
}
else
{
$fhit=fopen($day.".hit","w+");
fwrite($fhit,1);
}
//Конец ИН блока
}
$macho="$mrak/$year/$mes/";
chdir($macho);
$host=file($day.".host");
if($shost!="1")
{
@setcookie("shost","1",mktime(0,0,0,date("m"),date("d"),date("Y"))+60*60*24);
if ($js=="off")
{
}
else
{
//Блок почасовой статистики для host
$chhostex=file_exists($day.$moy.".hostch");
if ($chhostex=="true")
{
$chhost=file($day.$moy.".hostch");
$chhost[0]=$chhost[0]+1;
$fchhost=fopen($day.$moy.".hostch","w+");
fwrite($fchhost,$chhost[0]);
}
else
{
$fchhost=fopen($day.$moy.".hostch","w+");
fwrite($fchhost,1);
}
//конец временного блока для host
//host
$hostex=file_exists($day.".host");
if ($hostex=="true")
{
$host=file($day.".host");
$host[0]=$host[0]+1;
$fhost=fopen($day.".host","w+");
fwrite($fhost,$host[0]);
}
else
{
$fhost=fopen($day.".host","w+");
fwrite($fhost,1);
}
}
//Определение JavaScript
if ($js=="off")
{
//echo "Римский Тибр";
$jsoffex=file_exists($day.".jsoff");
if ($jsoffex=="true")
{
$jsoff=file($day.".jsoff");
$jsoff[0]=$jsoff[0]+1;
$fjsoff=fopen($day.".jsoff","w+");
fwrite($fjsoff,$jsoff[0]);
}
else
{
$fjsoff=fopen($day.".jsoff","w+");
fwrite($fjsoff,1);
}
}
else
{
//echo "Тибр";
$jsonex=file_exists($day.".json");
if ($jsonex=="true")
{
$json=file($day.".json");
$json[0]=$json[0]+1;
$fjson=fopen($day.".json","w+");
fwrite($fjson,$json[0]);
}
else
{
$fjson=fopen($day.".json","w+");
fwrite($fjson,1);
}
}
// Статистика браузеров
if (strstr($_SERVER["HTTP_USER_AGENT"], "Nav")) $browser = "Netscape";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE")) $browser = "MSIE";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Lynx")) $browser = "Lynx";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Opera")) $browser = "Opera";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "WebTV")) $browser = "WebTV";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Konqueror")) $browser = "Konqueror";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Bot")) $browser = "Bot";
else $browser = "bother";
//Netscape
if ($browser=="Netscape")
{
$Netscapeex=file_exists($day.".Netscape");
if ($Netscapeex=="true")
{
$Netscape=file($day.".Netscape");
$Netscape[0]=$Netscape[0]+1;
$fNetscape=fopen($day.".Netscape","w+");
fwrite($fNetscape,$Netscape[0]);
}
else
{
$fNetscape=fopen($day.".Netscape","w+");
fwrite($fNetscape,1);
}
}
//MSIE
if ($browser=="MSIE")
{
$MSIEex=file_exists($day.".MSIE");
if ($MSIEex=="true")
{
$MSIE=file($day.".MSIE");
$MSIE[0]=$MSIE[0]+1;
$fMSIE=fopen($day.".MSIE","w+");
fwrite($fMSIE,$MSIE[0]);
}
else
{
$fMSIE=fopen($day.".MSIE","w+");
fwrite($fMSIE,1);
}
}
//Lynx
if ($browser=="Lynx")
{
$Lynxex=file_exists($day.".Lynx");
if ($Lynxex=="true")
{
$Lynx=file($day.".Lynx");
$Lynx[0]=$Lynx[0]+1;
$fLynx=fopen($day.".Lynx","w+");
fwrite($fLynx,$Lynx[0]);
}
else
{
$fLynx=fopen($day.".Lynx","w+");
fwrite($fLynx,1);
}
}
//Opera
if ($browser=="Opera")
{
$Operaex=file_exists($day.".Opera");
if ($Operaex=="true")
{
$Opera=file($day.".Opera");
$Opera[0]=$Opera[0]+1;
$fOpera=fopen($day.".Opera","w+");
fwrite($fOpera,$Opera[0]);
}
else
{
$fOpera=fopen($day.".Opera","w+");
fwrite($fOpera,1);
}
}
//WebTV
if ($browser=="WebTV")
{
$WebTVex=file_exists($day.".WebTV");
if ($WebTVex=="true")
{
$WebTV=file($day.".WebTV");
$WebTV[0]=$WebTV[0]+1;
$fWebTV=fopen($day.".WebTV","w+");
fwrite($fWebTV,$WebTV[0]);
}
else
{
$fWebTV=fopen($day.".WebTV","w+");
fwrite($fWebTV,1);
}
}
//Konqueror
if ($browser=="Konqueror")
{
$Konquerorex=file_exists($day.".Konqueror");
if ($Konquerorex=="true")
{
$Konqueror=file($day.".Konqueror");
$Konqueror[0]=$Konqueror[0]+1;
$fKonqueror=fopen($day.".Konqueror","w+");
fwrite($fKonqueror,$Konqueror[0]);
}
else
{
$fKonqueror=fopen($day.".Konqueror","w+");
fwrite($fKonqueror,1);
}
}
//Bot
if ($browser=="Bot")
{
$Botex=file_exists($day.".Bot");
if ($Botex=="true")
{
$Bot=file($day.".Bot");
$Bot[0]=$Bot[0]+1;
$fBot=fopen($day.".Bot","w+");
fwrite($fBot,$Bot[0]);
}
else
{
$fBot=fopen($day.".Bot","w+");
fwrite($fBot,1);
}
}
//Другие броузеры
if ($browser=="bother")
{
$botherex=file_exists($day.".bother");
if ($botherex=="true")
{
$bother=file($day.".bother");
$bother[0]=$bother[0]+1;
$fbother=fopen($day.".bother","w+");
fwrite($fbother,$bother[0]);
}
else
{
$fbother=fopen($day.".bother","w+");
fwrite($fbother,1);
}
}
//Статистика по ОС
if (strstr($_SERVER["HTTP_USER_AGENT"], "Win")) $os = "Windows";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Mac")) $os = "Mac";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Linux")) $os = "Linux";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "FreeBSD")) $os = "FreeBSD";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "SunOS")) $os = "SunOS";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "IRIX")) $os = "IRIX";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "BeOS")) $os = "BeOS";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "OS/2")) $os = "OS/2";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "AIX")) $os = "AIX";
else $os = "sother";
//Windows
if ($os=="Windows")
{
$Windowsex=file_exists($day.".Windows");
if ($Windowsex=="true")
{
$Windows=file($day.".Windows");
$Windows[0]=$Windows[0]+1;
$fWindows=fopen($day.".Windows","w+");
fwrite($fWindows,$Windows[0]);
}
else
{
$fWindows=fopen($day.".Windows","w+");
fwrite($fWindows,1);
}
}
//Mac
if ($os=="Mac")
{
$Macex=file_exists($day.".Mac");
if ($Macex=="true")
{
$Mac=file($day.".Mac");
$Mac[0]=$Mac[0]+1;
$fMac=fopen($day.".Mac","w+");
fwrite($fMac,$Mac[0]);
}
else
{
$fMac=fopen($day.".Mac","w+");
fwrite($fMac,1);
}
}
//Linux
if ($os=="Linux")
{
$Linuxex=file_exists($day.".Linux");
if ($Linuxex=="true")
{
$Linux=file($day.".Linux");
$Linux[0]=$Linux[0]+1;
$fLinux=fopen($day.".Linux","w+");
fwrite($fLinux,$Linux[0]);
}
else
{
$fLinux=fopen($day.".Linux","w+");
fwrite($fLinux,1);
}
}
//FreeBSD
if ($os=="FreeBSD")
{
$FreeBSDex=file_exists($day.".FreeBSD");
if ($FreeBSDex=="true")
{
$FreeBSD=file($day.".FreeBSD");
$FreeBSD[0]=$FreeBSD[0]+1;
$fFreeBSD=fopen($day.".FreeBSD","w+");
fwrite($fFreeBSD,$FreeBSD[0]);
}
else
{
$fFreeBSD=fopen($day.".FreeBSD","w+");
fwrite($fFreeBSD,1);
}
}
//SunOS
if ($os=="SunOS")
{
$SunOSex=file_exists($day.".SunOS");
if ($SunOSex=="true")
{
$SunOS=file($day.".SunOS");
$SunOS[0]=$SunOS[0]+1;
$fSunOS=fopen($day.".SunOS","w+");
fwrite($fSunOS,$SunOS[0]);
}
else
{
$fSunOS=fopen($day.".SunOS","w+");
fwrite($fSunOS,1);
}
}
//IRIX
if ($os=="IRIX")
{
$IRIXex=file_exists($day.".IRIX");
if ($IRIXex=="true")
{
$IRIX=file($day.".IRIX");
$IRIX[0]=$IRIX[0]+1;
$fIRIX=fopen($day.".IRIX","w+");
fwrite($fIRIX,$IRIX[0]);
}
else
{
$fIRIX=fopen($day.".IRIX","w+");
fwrite($fIRIX,1);
}
}
//BeOS
if ($os=="BeOS")
{
$BeOSex=file_exists($day.".BeOS");
if ($BeOSex=="true")
{
$BeOS=file($day.".BeOS");
$BeOS[0]=$BeOS[0]+1;
$fBeOS=fopen($day.".BeOS","w+");
fwrite($fBeOS,$BeOS[0]);
}
else
{
$fBeOS=fopen($day.".BeOS","w+");
fwrite($fBeOS,1);
}
}
//OS/2
if ($os=="OS/2")
{
$OS2ex=file_exists($day.".OS2");
if ($OS2ex=="true")
{
$OS2=file($day.".OS2");
$OS2[0]=$OS2[0]+1;
$fOS2=fopen($day.".OS2","w+");
fwrite($fOS2,$OS2[0]);
}
else
{
$fOS2=fopen($day.".OS2","w+");
fwrite($fOS2,1);
}
}
//AIX
if ($os=="AIX")
{
$AIXex=file_exists($day.".AIX");
if ($AIXex=="true")
{
$AIX=file($day.".AIX");
$AIX[0]=$AIX[0]+1;
$fAIX=fopen($day.".AIX","w+");
fwrite($fAIX,$AIX[0]);
}
else
{
$fAIX=fopen($day.".AIX","w+");
fwrite($fAIX,1);
}
}
//sother
if ($os=="sother")
{
$sotherex=file_exists($day.".sother");
if ($sotherex=="true")
{
$sother=file($day.".sother");
$sother[0]=$sother[0]+1;
$fsother=fopen($day.".sother","w+");
fwrite($fsother,$sother[0]);
}
else
{
$fsother=fopen($day.".sother","w+");
fwrite($fsother,1);
}
}
//Боты поисковых машин
if (strstr($_SERVER["HTTP_USER_AGENT"], "StackRambler")) $os = "Rambler";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Yandex")) $os = "Yandex";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Scooter")) $os = "AltaVista";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Fast")) $os = "Fast";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "Googlebot")) $os = "Google";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "infoseek")) $os = "Infoseek";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "YahooBot")) $os = "Yahoo";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "aport")) $os = "Aport";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "slurp")) $os = "AOL";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "architextspider")) $os = "Excite";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "lycos")) $os = "Lycos";
elseif (strstr($_SERVER["HTTP_USER_AGENT"], "grabber")) $os = "DirectHit";
else $os = "seother";
$osdata=date('H:i:s');
//Rambler
if ($os=="Rambler")
{
$Ramblerex=file_exists($day.".Rambler");
if ($Ramblerex=="true")
{
$Rambler=file($day.".Rambler");
$Rambler[0]=$Rambler[0]+1;
$fRambler=fopen($day.".Rambler","w+");
fwrite($fRambler,$Rambler[0]);
$fdataRambler=fopen($day.".dataRambler","w+");
fwrite($fdataRambler,$osdata);
}
else
{
$fRambler=fopen($day.".Rambler","w+");
fwrite($fRambler,1);
$fdataRambler=fopen($day.".dataRambler","w+");
fwrite($fdataRambler,$osdata);
}
}
//Yandex
if ($os=="Yandex")
{
$Yandexex=file_exists($day.".Yandex");
if ($Yandexex=="true")
{
$Yandex=file($day.".Yandex");
$Yandex[0]=$Yandex[0]+1;
$fYandex=fopen($day.".Yandex","w+");
fwrite($fYandex,$Yandex[0]);
$fdataYandex=fopen($day.".dataYandex","w+");
fwrite($fdataYandex,$osdata);
}
else
{
$fYandex=fopen($day.".Yandex","w+");
fwrite($fYandex,1);
$fdataYandex=fopen($day.".dataYandex","w+");
fwrite($fdataYandex,$osdata);
}
}
//AltaVista
if ($os=="AltaVista")
{
$AltaVistaex=file_exists($day.".AltaVista");
if ($AltaVistaex=="true")
{
$AltaVista=file($day.".AltaVista");
$AltaVista[0]=$AltaVista[0]+1;
$fAltaVista=fopen($day.".AltaVista","w+");
fwrite($fAltaVista,$AltaVista[0]);
$fdataAltaVista=fopen($day.".dataAltaVista","w+");
fwrite($fdataAltaVista,$osdata);
}
else
{
$fAltaVista=fopen($day.".AltaVista","w+");
fwrite($fAltaVista,1);
$fdataAltaVista=fopen($day.".dataAltaVista","w+");
fwrite($fdataAltaVista,$osdata);
}
}
//Fast
if ($os=="Fast")
{
$Fastex=file_exists($day.".Fast");
if ($Fastex=="true")
{
$Fast=file($day.".Fast");
$Fast[0]=$Fast[0]+1;
$fFast=fopen($day.".Fast","w+");
fwrite($fFast,$Fast[0]);
$fdataFast=fopen($day.".dataFast","w+");
fwrite($fdataFast,$osdata);
}
else
{
$fFast=fopen($day.".Fast","w+");
fwrite($fFast,1);
$fdataFast=fopen($day.".dataFast","w+");
fwrite($fdataFast,$osdata);
}
}
//Google
if ($os=="Google")
{
$Googleex=file_exists($day.".Google");
if ($Googleex=="true")
{
$Google=file($day.".Google");
$Google[0]=$Google[0]+1;
$fGoogle=fopen($day.".Google","w+");
fwrite($fGoogle,$Google[0]);
$fdataGoogle=fopen($day.".dataGoogle","w+");
fwrite($fdataGoogle,$osdata);
}
else
{
$fGoogle=fopen($day.".Google","w+");
fwrite($fGoogle,1);
$fdataGoogle=fopen($day.".dataGoogle","w+");
fwrite($fdataGoogle,$osdata);
}
}
//Infoseek
if ($os=="Infoseek")
{
$Infoseekex=file_exists($day.".Infoseek");
if ($Infoseekex=="true")
{
$Infoseek=file($day.".Infoseek");
$Infoseek[0]=$Infoseek[0]+1;
$fInfoseek=fopen($day.".Infoseek","w+");
fwrite($fInfoseek,$Infoseek[0]);
$fdataInfoseek=fopen($day.".dataInfoseek","w+");
fwrite($fdataInfoseek,$osdata);
}
else
{
$fInfoseek=fopen($day.".Infoseek","w+");
fwrite($fInfoseek,1);
$fdataInfoseek=fopen($day.".dataInfoseek","w+");
fwrite($fdataInfoseek,$osdata);
}
}
//Yahoo
if ($os=="Yahoo")
{
$Yahooex=file_exists($day.".Yahoo");
if ($Yahooex=="true")
{
$Yahoo=file($day.".Yahoo");
$Yahoo[0]=$Yahoo[0]+1;
$fYahoo=fopen($day.".Yahoo","w+");
fwrite($fYahoo,$Yahoo[0]);
$fdataYahoo=fopen($day.".dataYahoo","w+");
fwrite($fdataYahoo,$osdata);
}
else
{
$fYahoo=fopen($day.".Yahoo","w+");
fwrite($fYahoo,1);
$fdataYahoo=fopen($day.".dataYahoo","w+");
fwrite($fdataYahoo,$osdata);
}
}
//Aport
if ($os=="Aport")
{
$Aportex=file_exists($day.".Aport");
if ($Aportex=="true")
{
$Aport=file($day.".Aport");
$Aport[0]=$Aport[0]+1;
$fAport=fopen($day.".Aport","w+");
fwrite($fAport,$Aport[0]);
$fdataAport=fopen($day.".dataAport","w+");
fwrite($fdataAport,$osdata);
}
else
{
$fAport=fopen($day.".Aport","w+");
fwrite($fAport,1);
$fdataAport=fopen($day.".dataAport","w+");
fwrite($fdataAport,$osdata);
}
}
//AOL
if ($os=="AOL")
{
$AOLex=file_exists($day.".AOL");
if ($AOLex=="true")
{
$AOL=file($day.".AOL");
$AOL[0]=$AOL[0]+1;
$fAOL=fopen($day.".AOL","w+");
fwrite($fAOL,$AOL[0]);
$fdataAOL=fopen($day.".dataAOL","w+");
fwrite($fdataAOL,$osdata);
}
else
{
$fAOL=fopen($day.".AOL","w+");
fwrite($fAOL,1);
$fdataAOL=fopen($day.".dataAOL","w+");
fwrite($fdataAOL,$osdata);
}
}
//Excite
if ($os=="Excite")
{
$Exciteex=file_exists($day.".Excite");
if ($Exciteex=="true")
{
$Excite=file($day.".Excite");
$Excite[0]=$Excite[0]+1;
$fExcite=fopen($day.".Excite","w+");
fwrite($fExcite,$Excite[0]);
$fdataExcite=fopen($day.".dataExcite","w+");
fwrite($fdataExcite,$osdata);
}
else
{
$fExcite=fopen($day.".Excite","w+");
fwrite($fExcite,1);
$fdataExcite=fopen($day.".dataExcite","w+");
fwrite($fdataExcite,$osdata);
}
}
//Lycos
if ($os=="Lycos")
{
$Lycosex=file_exists($day.".Lycos");
if ($Lycosex=="true")
{
$Lycos=file($day.".Lycos");
$Lycos[0]=$Lycos[0]+1;
$fLycos=fopen($day.".Lycos","w+");
fwrite($fLycos,$Lycos[0]);
$fdataLycos=fopen($day.".dataLycos","w+");
fwrite($fdataLycos,$osdata);
}
else
{
$fLycos=fopen($day.".Lycos","w+");
fwrite($fLycos,1);
$fdataLycos=fopen($day.".dataLycos","w+");
fwrite($fdataLycos,$osdata);
}
}
//DirectHit
if ($os=="DirectHit")
{
$DirectHitex=file_exists($day.".DirectHit");
if ($DirectHitex=="true")
{
$DirectHit=file($day.".DirectHit");
$DirectHit[0]=$DirectHit[0]+1;
$fDirectHit=fopen($day.".DirectHit","w+");
fwrite($fDirectHit,$DirectHit[0]);
$fdataDirectHit=fopen($day.".dataDirectHit","w+");
fwrite($fdataDirectHit,$osdata);
}
else
{
$fDirectHit=fopen($day.".DirectHit","w+");
fwrite($fDirectHit,1);
$fdataDirectHit=fopen($day.".dataDirectHit","w+");
fwrite($fdataDirectHit,$osdata);
}
}
//seother
if ($os=="seother")
{
$seotherex=file_exists($day.".seother");
if ($seotherex=="true")
{
$seother=file($day.".seother");
$seother[0]=$seother[0]+1;
$fseother=fopen($day.".seother","w+");
fwrite($fseother,$seother[0]);
$fdataseother=fopen($day.".dataseother","w+");
fwrite($fdataseother,$osdata);
}
else
{
$fseother=fopen($day.".seother","w+");
fwrite($fseother,1);
$fdataseother=fopen($day.".dataseother","w+");
fwrite($fdataseother,$osdata);
}
}
// базу по географии
//Россия
if ($HTTP_ACCEPT_LANGUAGE=="ru")
{
$ruex=file_exists($day.".ru");
if ($ruex=="true")
{
$ru=file($day.".ru");
$ru[0]=$ru[0]+1;
$fru=fopen($day.".ru","w+");
fwrite($fru,$ru[0]);
}
else
{
$fru=fopen($day.".ru","w+");
fwrite($fru,1);
}
}
//Украина
if ($HTTP_ACCEPT_LANGUAGE=="uk")
{
$ukex=file_exists($day.".uk");
if ($ukex=="true")
{
$uk=file($day.".uk");
$uk[0]=$uk[0]+1;
$fuk=fopen($day.".uk","w+");
fwrite($fuk,$uk[0]);
}
else
{
$fuk=fopen($day.".uk","w+");
fwrite($fuk,1);
}
}
//Белорусия
if ($HTTP_ACCEPT_LANGUAGE=="be")
{
$beex=file_exists($day.".be");
if ($beex=="true")
{
$be=file($day.".be");
$be[0]=$be[0]+1;
$fbe=fopen($day.".be","w+");
fwrite($fbe,$be[0]);
}
else
{
$fbe=fopen($day.".be","w+");
fwrite($fbe,1);
}
}
//Болгария
if ($HTTP_ACCEPT_LANGUAGE=="bg")
{
$bgex=file_exists($day.".bg");
if ($bgex=="true")
{
$bg=file($day.".bg");
$bg[0]=$bg[0]+1;
$fbg=fopen($day.".bg","w+");
fwrite($fbg,$bg[0]);
}
else
{
$fbg=fopen($day.".bg","w+");
fwrite($fbg,1);
}
}
//Финляндия
if ($HTTP_ACCEPT_LANGUAGE=="fi")
{
$fiex=file_exists($day.".fi");
if ($fiex=="true")
{
$fi=file($day.".fi");
$fi[0]=$fi[0]+1;
$ffi=fopen($day.".fi","w+");
fwrite($ffi,$fi[0]);
}
else
{
$ffi=fopen($day.".fi","w+");
fwrite($ffi,1);
}
}
//Эстония
if ($HTTP_ACCEPT_LANGUAGE=="et")
{
$etex=file_exists($day.".et");
if ($etex=="true")
{
$et=file($day.".et");
$et[0]=$et[0]+1;
$fet=fopen($day.".et","w+");
fwrite($fet,$et[0]);
}
else
{
$fet=fopen($day.".et","w+");
fwrite($fet,1);
}
}
//Чехия
if ($HTTP_ACCEPT_LANGUAGE=="cs")
{
$csex=file_exists($day.".cs");
if ($csex=="true")
{
$cs=file($day.".cs");
$cs[0]=$cs[0]+1;
$fcs=fopen($day.".cs","w+");
fwrite($fcs,$cs[0]);
}
else
{
$fcs=fopen($day.".cs","w+");
fwrite($fcs,1);
}
}
//Швеция
if ($HTTP_ACCEPT_LANGUAGE=="sv")
{
$svex=file_exists($day.".sv");
if ($svex=="true")
{
$sv=file($day.".sv");
$sv[0]=$sv[0]+1;
$fsv=fopen($day.".sv","w+");
fwrite($fsv,$sv[0]);
}
else
{
$fsv=fopen($day.".sv","w+");
fwrite($fsv,1);
}
}
//Франция
if ($HTTP_ACCEPT_LANGUAGE=="fr")
{
$frex=file_exists($day.".fr");
if ($frex=="true")
{
$fr=file($day.".fr");
$fr[0]=$fr[0]+1;
$ffr=fopen($day.".fr","w+");
fwrite($ffr,$fr[0]);
}
else
{
$ffr=fopen($day.".fr","w+");
fwrite($ffr,1);
}
}
//Турция
if ($HTTP_ACCEPT_LANGUAGE=="tr")
{
$trex=file_exists($day.".tr");
if ($trex=="true")
{
$tr=file($day.".tr");
$tr[0]=$tr[0]+1;
$ftr=fopen($day.".tr","w+");
fwrite($ftr,$tr[0]);
}
else
{
$ftr=fopen($day.".tr","w+");
fwrite($ftr,1);
}
}
//Румыния
if ($HTTP_ACCEPT_LANGUAGE=="ro")
{
$roex=file_exists($day.".ro");
if ($roex=="true")
{
$ro=file($day.".ro");
$ro[0]=$ro[0]+1;
$fro=fopen($day.".ro","w+");
fwrite($fro,$ro[0]);
}
else
{
$fro=fopen($day.".ro","w+");
fwrite($fro,1);
}
}
//Польша
if ($HTTP_ACCEPT_LANGUAGE=="pl")
{
$plex=file_exists($day.".pl");
if ($plex=="true")
{
$pl=file($day.".pl");
$pl[0]=$pl[0]+1;
$fpl=fopen($day.".pl","w+");
fwrite($fpl,$pl[0]);
}
else
{
$fpl=fopen($day.".pl","w+");
fwrite($fpl,1);
}
}
//Германия
if ($HTTP_ACCEPT_LANGUAGE=="de")
{
$deex=file_exists($day.".de");
if ($deex=="true")
{
$de=file($day.".de");
$de[0]=$de[0]+1;
$fde=fopen($day.".de","w+");
fwrite($fde,$de[0]);
}
else
{
$fde=fopen($day.".de","w+");
fwrite($fde,1);
}
}
//Голландия
if ($HTTP_ACCEPT_LANGUAGE=="nl")
{
$nlex=file_exists($day.".nl");
if ($nlex=="true")
{
$nl=file($day.".nl");
$nl[0]=$nl[0]+1;
$fnl=fopen($day.".nl","w+");
fwrite($fnl,$nl[0]);
}
else
{
$fnl=fopen($day.".nl","w+");
fwrite($fnl,1);
}
}
//Дания
if ($HTTP_ACCEPT_LANGUAGE=="da")
{
$daex=file_exists($day.".da");
if ($daex=="true")
{
$da=file($day.".da");
$da[0]=$da[0]+1;
$fda=fopen($day.".da","w+");
fwrite($fda,$da[0]);
}
else
{
$fda=fopen($day.".da","w+");
fwrite($fda,1);
}
}
//Греция
if ($HTTP_ACCEPT_LANGUAGE=="el")
{
$elex=file_exists($day.".el");
if ($elex=="true")
{
$el=file($day.".el");
$el[0]=$el[0]+1;
$fel=fopen($day.".el","w+");
fwrite($fel,$el[0]);
}
else
{
$fel=fopen($day.".el","w+");
fwrite($fel,1);
}
}
//Литва
if ($HTTP_ACCEPT_LANGUAGE=="lt")
{
$ltex=file_exists($day.".lt");
if ($ltex=="true")
{
$lt=file($day.".lt");
$lt[0]=$lt[0]+1;
$flt=fopen($day.".lt","w+");
fwrite($flt,$lt[0]);
}
else
{
$flt=fopen($day.".lt","w+");
fwrite($flt,1);
}
}
//Португалия
if ($HTTP_ACCEPT_LANGUAGE=="pt")
{
$ptex=file_exists($day.".pt");
if ($ptex=="true")
{
$pt=file($day.".pt");
$pt[0]=$pt[0]+1;
$fpt=fopen($day.".pt","w+");
fwrite($fpt,$pt[0]);
}
else
{
$fpt=fopen($day.".pt","w+");
fwrite($fpt,1);
}
}
//Италия
if ($HTTP_ACCEPT_LANGUAGE=="it")
{
$itex=file_exists($day.".it");
if ($itex=="true")
{
$it=file($day.".it");
$it[0]=$it[0]+1;
$fit=fopen($day.".it","w+");
fwrite($fpt,$it[0]);
}
else
{
$fit=fopen($day.".it","w+");
fwrite($fit,1);
}
}
//Венгрия
if ($HTTP_ACCEPT_LANGUAGE=="hu")
{
$huex=file_exists($day.".hu");
if ($huex=="true")
{
$hu=file($day.".hu");
$hu[0]=$hu[0]+1;
$fhu=fopen($day.".hu","w+");
fwrite($fhu,$hu[0]);
}
else
{
$fhu=fopen($day.".hu","w+");
fwrite($fhu,1);
}
}
//Великобритания
if ($HTTP_ACCEPT_LANGUAGE=="en-gb")
{
$engbex=file_exists($day.".engb");
if ($engbex=="true")
{
$engb=file($day.".engb");
$engb[0]=$engb[0]+1;
$fengb=fopen($day.".engb","w+");
fwrite($fengb,$engb[0]);
}
else
{
$fengb=fopen($day.".engb","w+");
fwrite($fengb,1);
}
}
//США
if ($HTTP_ACCEPT_LANGUAGE=="en-us")
{
$enusex=file_exists($day.".enus");
if ($enusex=="true")
{
$enus=file($day.".enus");
$enus[0]=$enus[0]+1;
$fenus=fopen($day.".enus","w+");
fwrite($fenus,$enus[0]);
}
else
{
$fenus=fopen($day.".enus","w+");
fwrite($fenus,1);
}
}
//Канада
if ($HTTP_ACCEPT_LANGUAGE=="en-ca")
{
$encaex=file_exists($day.".enca");
if ($encaex=="true")
{
$enca=file($day.".enca");
$enca[0]=$enca[0]+1;
$fenca=fopen($day.".enca","w+");
fwrite($fenca,$enca[0]);
}
else
{
$fenca=fopen($day.".enca","w+");
fwrite($fenca,1);
}
}
//Австралия
if ($HTTP_ACCEPT_LANGUAGE=="en-au")
{
$enauex=file_exists($day.".enau");
if ($enauex=="true")
{
$enau=file($day.".enau");
$enau[0]=$enau[0]+1;
$fenau=fopen($day.".enau","w+");
fwrite($fenau,$enau[0]);
}
else
{
$fenau=fopen($day.".enau","w+");
fwrite($fenau,1);
}
}
//Ирландия
if ($HTTP_ACCEPT_LANGUAGE=="en-ie")
{
$enieex=file_exists($day.".enie");
if ($enieex=="true")
{
$enie=file($day.".enie");
$enie[0]=$enie[0]+1;
$fenie=fopen($day.".enie","w+");
fwrite($fenie,$enie[0]);
}
else
{
$fenie=fopen($day.".enie","w+");
fwrite($fenie,1);
}
}
//Бельгия
if ($HTTP_ACCEPT_LANGUAGE=="nl-be")
{
$nlbeex=file_exists($day.".nlbe");
if ($nlbeex=="true")
{
$nlbe=file($day.".nlbe");
$nlbe[0]=$nlbe[0]+1;
$fnlbe=fopen($day.".nlbe","w+");
fwrite($fnlbe,$nlbe[0]);
}
else
{
$fnlbe=fopen($day.".nlbe","w+");
fwrite($fnlbe,1);
}
}
//Испания
if ($HTTP_ACCEPT_LANGUAGE=="es")
{
$esex=file_exists($day.".es");
if ($esex=="true")
{
$es=file($day.".es");
$es[0]=$es[0]+1;
$fes=fopen($day.".es","w+");
fwrite($fes,$es[0]);
}
else
{
$fes=fopen($day.".es","w+");
fwrite($fes,1);
}
}
//Казахстан
if ($HTTP_ACCEPT_LANGUAGE=="kk")
{
$kkex=file_exists($day.".kk");
if ($kkex=="true")
{
$kk=file($day.".kk");
$kk[0]=$kk[0]+1;
$fkk=fopen($day.".kk","w+");
fwrite($fkk,$kk[0]);
}
else
{
$fkk=fopen($day.".kk","w+");
fwrite($fkk,1);
}
}
//Бразилия
if ($HTTP_ACCEPT_LANGUAGE=="pt-br")
{
$ptbrex=file_exists($day.".ptbr");
if ($ptbrex=="true")
{
$ptbr=file($day.".ptbr");
$ptbr[0]=$ptbr[0]+1;
$fptbr=fopen($day.".ptbr","w+");
fwrite($fptbr,$ptbr[0]);
}
else
{
$fptbr=fopen($day.".ptbr","w+");
fwrite($fptbr,1);
}
}
//Латвия
if ($HTTP_ACCEPT_LANGUAGE=="lv")
{
$lvex=file_exists($day.".lv");
if ($lvex=="true")
{
$lv=file($day.".lv");
$lv[0]=$lv[0]+1;
$flv=fopen($day.".lv","w+");
fwrite($flv,$lv[0]);
}
else
{
$flv=fopen($day.".lv","w+");
fwrite($flv,1);
}
}
//Индонезия
if ($HTTP_ACCEPT_LANGUAGE=="id")
{
$idex=file_exists($day.".id");
if ($idex=="true")
{
$id=file($day.".id");
$id[0]=$id[0]+1;
$fid=fopen($day.".id","w+");
fwrite($fid,$id[0]);
}
else
{
$fid=fopen($day.".id","w+");
fwrite($fid,1);
}
}
}
}
else
{
}
}
// echo "$js";
?>