Hi,when i look on user profile i want to see full browser infi,now it says for example Browser:Opera 9.80,bu i want to say Browser:Opera 9.80/Nokia E5. Can someone help me to solve this problem.Thank you very much
Full Browser info on Lavalair
Collapse
X
-
$ubr = $_SERVER["HTTP_USER_AGENT"];
you may also want to use mysql_escape_string() to stop any browser sql injections
eg:
$ubr = mysql_escape_string($_SERVER["HTTP_USER_AGENT"]);Last edited by something else; 19.05.15, 07:46.
Comment
-
Originally posted by stefan998 View PostThan you very much,it worked perfectly,i have one question:Does anyone know how to upload smilies with code directly from phone/computer because when i upload smilies i must enter url of the smiley and then when you send pm it gets reported
./folder/smiles/smile.gif
<!DOCTYPE html PUBLIC "-//WAPFORUM.RS
Comment
-
Originally posted by stefan998 View PostNow on browser is showing opera9.80/(Android bla bla) but not phone model<!DOCTYPE html PUBLIC "-//WAPFORUM.RS
Comment
-
Originally posted by stefan998 View PostHi,when i look on user profile i want to see full browser infi,now it says for example Browser:Opera 9.80,bu i want to say Browser:Opera 9.80/Nokia E5. Can someone help me to solve this problem.Thank you very much
PHP Code:$agent = mysql_real_escape_string ($_SERVER['HTTP_USER_AGENT']);
$agent2 = $agent;
PHP Code:///////////////////////////////////////////Get Browser in detail
function getbrowser_uid($uid)
{
$not = mysql_fetch_array(mysql_query("SELECT useragent FROM ibwf_users WHERE id='".$uid."'"));
return $not[0];
}
now put this new table in ibwf_users
PHP Code:`useragent` varchar(250) NOT NULL,
PHP Code:$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', useragent='".$agent2."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
now put this in user profile to see their user agent
PHP Code:$nopli = mysql_fetch_array(mysql_query("SELECT useragent FROM ibwf_users WHERE id='".$who."'"));
echo "User Agent Details:</b> $nopli[0]<br/>";
Last edited by thunderwap; 21.05.15, 05:35.sigpic
WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!
Comment
-
Originally posted by stefan998 View PostThanks,but i must replace mysql_escape_string with mysql_real_escape_string because it will send error
http://wapx.amob.com
Applications, Games, Wallpapers, Ringtones, Videos, Themes, Screensaver and More!!!
Comment
Comment