Fetch Browser Info From Members
Started on the old forum in November 2007 · view the original in the archive · old links redirect here
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.
that was just a quess and myt b wrong
Want something coded email me at sales@webnwaphost.com for a prices.
get the info by
$brws = $_SERVER['HTTP_USER_AGENT'];
and to show it just do
echo "Browser $brws";
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
public_html or www directory or the directory where you upload your script with your ftp account
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
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