Fetch Browser Info From Members

Started on the old forum in November 2007 · view the original in the archive · old links redirect here

12 replies · 1,854 views · started 19 years ago · 1 min read

6 participants
synergyx Developer · 100 posts #1

I need sum! to show me how i can fetch browser ino from members on my site.

im using this code CODE$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'")); echo "Browser: $nopl[0] ";

and then theres the table value. can any1 help?

crazybrumi Super moderator Principal · 1,064 posts #2

I need sum! to show me how i can fetch browser ino from members on my site.

im using this code CODE $nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'")); echo "Browser: $nopl[0] ";

and then theres the table value. can any1 help?

$sql = "INSERT INTO ibwf_users(Browser) VALUES ('$browser')"; $result = mysql_query($sql)

thats to save it into broswer

and try browser varchar(120) NOT NULL default '',

for table ope thats what yu wanted

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

synergyx Developer · 100 posts #4

the table looks right but im not sure about code as its still not working

WhiteWarrior Principal · 1,419 posts #5

get the info by

$brws = $_SERVER['HTTP_USER_AGENT'];

and to show it just do

echo "Browser $brws";
synergyx Developer · 100 posts #6

i have checked, but for sum reason its not pulling browser info from users. but wen i add it into the script i am creating, it works fine.

alesh Lead · 604 posts #7

i have checked, but for sum reason its not pulling browser info from users. but wen i add it into the script i am creating, it works fine.

u have 2 turn php globals ON

u cn do it in another way also but this is an easiest way....

eeeeerrr....

synergyx Developer · 100 posts #9

its your hosting problem,delete the .htaccess file and upload this .htaccess file having this this code

php_flag register_globals on

where is the file, that i must use

Guest #11

I need sum! to show me how i can fetch browser ino from members on my site.

im using this code CODE $nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'")); echo "Browser: $nopl[0] ";

and then theres the table value. can any1 help? you change this code

$brws = explode("/",$HTTP_USER_AGENT); (change to)

$brws = explode(" ",$_SERVER[HTTP_USER_AGENT] ); its work

Guest #12
$nopl = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$who."'"));
echo "Browser: [b]".$nopl["browserm"]."[/b]
";

that should do it 😀

djlee Developer · 224 posts #13

you DO NOT need register globals ON .. anyone that tells you otherwise should be shot.. its a major security risk.. anyone that even has it on in php.ini still should really think of shutting down their own sites before someone else does.

$_SERVER is a super global .. it does not rely on register globals .. register globals does the same as the php function extract() .. register globals will take $_POST['xxx'] and automatically assign it too $xxx .. which is a variable within the local scope .. so if i then set index.php?xxx=DROP TABLE WHATEVER , this becomes

$_POST['xxx'] = "ABC";
$xxx = "ABC";

$_GET['xxx'] = "ABC";
$xxx = "DROP ........";

as you can see what i entered in teh URL has overiden the post var and im dropping your mysql tables


$_SERVER['HTTP_USER_AGENT'] will work

so will

$HTTP_SERVER_VARS['HTTP_USER_AGENT'] as long as you have register_long_arrays enabled

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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