Full Browser info on Lavalair

Started on the old forum in May 2015 · view the original in the archive · old links redirect here

14 replies · 392 views · started 11 years ago · 1 min read

5 participants
stefan998 Junior · 25 posts #1

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:)

something else Fellow · 2,296 posts #2

remove the explode($browser) from index.php - you may also want to change the browser field in the database to contain 255 characters

stefan998 Junior · 25 posts #4

$brws = explode(" ",$_SERVER["HTTP_USER_AGENT"]); $ubr = $brws[0]; What to write instead explode because i cant get $ubr

something else Fellow · 2,296 posts #5

$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"]);

stefan998 Junior · 25 posts #6

Thanks,but i must replace mysql_escape_string with mysql_real_escape_string because it will send error

stefan998 Junior · 25 posts #8

Than 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

stefan998 Junior · 25 posts #9

Now on browser is showing opera9.80/(Android bla bla) but not phone model

arnage Lead · 811 posts #10

stefan998 wrote: Than 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

Don't add it with http, add just folder location.

./folder/smiles/smile.gif

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
arnage Lead · 811 posts #11

stefan998 wrote: Now on browser is showing opera9.80/(Android bla bla) but not phone model

See this: </t/7367-detect-real-user-agent>

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
something else Fellow · 2,296 posts #12
//////

$ubr = isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) ? mysql_real_escape_string($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) : mysql_real_escape_string($_SERVER['HTTP_USER_AGENT']);

//////
thunderwap Developer · 169 posts #14

stefan998 wrote: 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:)

copy this code and paste in index.php

$agent = mysql_real_escape_string ($_SERVER['HTTP_USER_AGENT']);
$agent2 = $agent;

now put this code in core

///////////////////////////////////////////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

`useragent` varchar(250) NOT NULL,

make sure u put this code in index.php else it will show blank

$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

$nopli = mysql_fetch_array(mysql_query("SELECT useragent FROM ibwf_users WHERE id='".$who."'"));
  echo "User Agent Details:</b> $nopli[0]<br/>";

WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

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