X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=testbed%2Fua_test.php;h=97309b3b84102bbcfa2b93d37603a335544bf793;hp=e398bdb93d863367f29aefd252e8544881cefa14;hb=55fef093d1027a06f8047e45148d71b48bb6b7d2;hpb=e742e50704b7b09c6693b8d8284bf8a558b411a9 diff --git a/testbed/ua_test.php b/testbed/ua_test.php index e398bdb..97309b3 100644 --- a/testbed/ua_test.php +++ b/testbed/ua_test.php @@ -5,6 +5,9 @@ include("inchandler.inc"); $wrapper->pgtop("KaiRo's Browser-Test"); +// set default time zone - right now, always the one the server is in! +date_default_timezone_set('Europe/Vienna'); + $httpvars = $util->getHTTPvars(); if (strlen($httpvars["ua"])) { $ua = new userAgent($httpvars["ua"]); @@ -25,7 +28,10 @@ print("
The engine version is reported as "".$ua->getEngineVersion(). print("
The operating system is reported as "".$ua->getOS().""\n"); print("
The system platform is reported as "".$ua->getPlatform().""\n"); print("
The browser language is reported as "".$ua->getLanguage().""\n"); -if ($ua->geckobased()) { print("
The Gecko date is reported as "".$ua->getGeckoDate().""\n"); } +if ($ua->hasEngine('gecko')) { + print("
The Gecko date is reported as "".$ua->getGeckoDate().""\n"); + print("
The full Gecko date/time is reported as "".date('r',$ua->getGeckoTime()).""\n"); +} print("

I conclude this must be ".$ua->getBrand()." ".$ua->getVersion()."\n"); print("
This is ".($ua->isBot()?"an":"no")." automated robot.\n"); @@ -36,7 +42,7 @@ print("\n"); print("

Test the following UA string (leave empty to read it from your browser):\n"); print("

\n"); -print("uastring)."\" size=\"80\" maxlength=\"150\">\n"); +print("getUAString())."\" size=\"80\" maxlength=\"150\">\n"); print("

\n"); $wrapper->pgbottom(); ?>