Browser Info

Started on the old forum in July 2006 · view the original in the archive · old links redirect here

23 replies · 2,906 views · started 20 years ago · 1 min read

TL;DR · summary of 23 replies
  • -Mike-- asked for a way to change browser information, like replacing "Opera 9.0 / (Windows NT)" with just "Opera".
  • --Mike-- wanted this applied to different browsers and devices, such as Samsung D500.
  • CLINT provided a code snippet that worked: [code] $browser = $_SERVER['HTTP_USER_AGENT']; echo 'Browser: ' . $browser; [/code]
  • Guest suggested using the full browser name with OS details for more accuracy.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

2 participants
Guest #21

ok i was thinkin if i could even get the visitors ip and bowser stored in a .txt file or somethin is it possible?

linkrx7 #22

dnt no bout visitors but this code i use to log all a users logins in there own txt file in a logs folder

$ipr = getip();
$brws = $_SERVER['HTTP_USER_AGENT'];
$ubr = $brws;
$alli = "Username: ".$uid."
Password: ".$pwd."
Ip-Address: ".$ipr."
Browser: ".$ubr."
Script: Wap 1.0(wml)
----------
";
if(trim($uid)!=""){
$fname = "../logs/".$uid.".txt";
$out = fopen($fname,"a+");
fwrite($out,$alli);
fclose($out);}

it goes in the login file for lavaliar script

linkrx7 #23

and as for cutting down browser names u dnt need to make them show more 2 block as ip addresses can b blocked from most hosting control panels especially cPanel users so this is my browser code works fine 4 me

$brws = explode("/",$HTTP_USER_AGENT); $ubr = $brws[0];

some use space as itll stil show like on opera it will show opera 9.1

$brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0];

Guest #24

how do u keep the users records cud u explain it more specifically?

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close