X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=testbed%2Fua_test.php;h=4fe45a72b5558036d46a1b114284813a14f0f9f0;hp=ae7387e76420625924f9eca50c20a525266436af;hb=724f6e78b52e2e9474a22e6c1a4bf53750e90ec1;hpb=b8db1df4f951c3aa5e0210572f71513d935f2ada diff --git a/testbed/ua_test.php b/testbed/ua_test.php index ae7387e..4fe45a7 100644 --- a/testbed/ua_test.php +++ b/testbed/ua_test.php @@ -1,15 +1,9 @@ - - - - - - KaiRo's Browser-Test - - pgtop("KaiRo's Browser-Test"); $httpvars = $util->getHTTPvars(); if (strlen($httpvars["ua"])) { @@ -21,7 +15,7 @@ else { print("

KaiRo's Browser-Test

\n"); -print("I read the following user agent string from your browser:\n
"); +print("I read the following user agent string from ".(strlen($httpvars["ua"])?"your input":"your browser").":\n
"); print("".$ua->uastring."\n"); print("

This is ".($ua->isns()?"a":"no")." Netscape browser.\n"); @@ -29,15 +23,16 @@ print("
This is ".($ua->isns4()?"a":"no")." Netscape Communicator 4 br print("
This is ".($ua->isie()?"an":"no")." Internet Explorer browser.\n"); print("
This is ".($ua->geckobased()?"a":"no")." Gecko-based browser.\n"); print("
This is ".($ua->khtmlbased()?"a":"no")." KHTML-based browser.\n"); -print("
The browser brand is reported as "".$ua->brand.""\n"); -print("
The browser version is reported as "".$ua->version.""\n"); +print("
This is ".($ua->isbot()?"an":"no")." automated robot.\n"); +print("
The browser brand is reported as "".$ua->getBrand().""\n"); +print("
The browser version is reported as "".$ua->getVersion().""\n"); if ($ua->geckobased()) { print("
The Gecko date is reported as "".$ua->geckodate().""\n"); } -print("

I conclude this must be ".$ua->brand." ".$ua->version."\n"); +print("

I conclude this must be ".$ua->getBrand()." ".$ua->getVersion()."\n"); -print("

Test the following UA string:\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("

\n"); + +$wrapper->pgbottom(); ?> - - \ No newline at end of file