PHPee.com PHP development forum
Firefox
Goto page 1, 2  Next
 
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger Support
View previous topic :: View next topic  
Author Message
Leonie



Joined: 01 Aug 2004
Posts: 12

PostPosted: Fri Aug 27, 2004 9:03 am    Post subject: Firefox Reply with quote
Hi,

I've noticed that Firefox isn't being logged as used browser. A friend used Firefox 0.8 to see my site, but Pphlogger logged it as Mozilla 1.6.

Why? and how can this be set to correctly log the browser? I know Firefox is owned by Mozilla, but it's a different browser, so it should be logged as a separate one, right?

Thanks,
Leonie
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 929
Location: London, UK

PostPosted: Fri Aug 27, 2004 10:13 am    Post subject: Reply with quote
Firefox is built on the Mozilla framework, hence it being logged as Mozilla.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
Leonie



Joined: 01 Aug 2004
Posts: 12

PostPosted: Fri Aug 27, 2004 12:03 pm    Post subject: Reply with quote
But if other counters can see the difference between Firefox and Mozilla, why can't Pphlogger?

Leonie
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 929
Location: London, UK

PostPosted: Fri Aug 27, 2004 2:43 pm    Post subject: Reply with quote
It wasn't obviously coded in.
I'm sure greater support will be written in in the next version of PPHlogger.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
Rolandks



Joined: 17 Nov 2003
Posts: 11
Location: Kassel, Germany

PostPosted: Mon Nov 15, 2004 9:44 am    Post subject: Reply with quote
Quote:

It wasn't obviously coded in.


Is it not possible to add Firefox or other browsers manual in the database. I have search, but no found how to add a browser?

What about table: agents ? Is it not possible to add the browser here, but what about Column system - add OS for browser ?

Also:
the new Search-Engine from Microsoft is not listed as Search-Engine.

I hope the next version of PPHlogger will add this changing things in a database or config-files to edit ..... Very Happy

Roland
Back to top
View user's profile Send private message
lionel
Moderator


Joined: 09 Dec 2003
Posts: 121
Location: Costa Blanca, Spain

PostPosted: Mon Nov 15, 2004 1:24 pm    Post subject: Reply with quote
firefox does get logged fine, turn full agent on and you'll see:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0


vs


Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040301


pphlogger doesn't have a checklist of useragents to be able to display them, if it did it would be out of date ages ago! it reads your user agent and then displays it Smile
Back to top
View user's profile Send private message Visit poster's website
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 929
Location: London, UK

PostPosted: Mon Nov 15, 2004 2:19 pm    Post subject: Reply with quote
Thanks Lionel for pointing that out Smile

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
Rolandks



Joined: 17 Nov 2003
Posts: 11
Location: Kassel, Germany

PostPosted: Mon Nov 15, 2004 2:59 pm    Post subject: Reply with quote
Yes, it is display in the LOG but it is not counting as FIREFOX in Browser/OS - Summary.

Agian: What about table:agents ?

Roland
Back to top
View user's profile Send private message
lionel
Moderator


Joined: 09 Dec 2003
Posts: 121
Location: Costa Blanca, Spain

PostPosted: Mon Nov 15, 2004 6:48 pm    Post subject: Reply with quote
hehe, one of my users pointed it out to me Embarassed, i'd never noticed before either Laughing

Sorry Rolandks, I assumed you were talking about the logs.

For that i would imagine you don't need to touch anything in the database as it already holds the full UA, the dpsbrowsersos code would need to be changed, most likely these lines

Quote:

$sql = "SELECT browser, count(browser) as hits FROM $tbl_logs AS L, ".PPHL_TBL_AGENTS." AS A "
. "WHERE agentid = A.id AND browser > '' ";
if(isset($sql_fromto)) $sql .= "AND ".$sql_fromto;
$sql .= "GROUP BY browser ORDER BY hits DESC";


but that's just a shot in the dark, i'm useless at php Smile

But, at the end of the day Firefox is just a standalone version mozilla, mozilla being the full package, they are at teh end of the day the same browser.
Back to top
View user's profile Send private message Visit poster's website
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 929
Location: London, UK

PostPosted: Tue Nov 16, 2004 1:22 am    Post subject: Reply with quote
Rolandks wrote:
Yes, it is display in the LOG but it is not counting as FIREFOX in Browser/OS - Summary.


As Lionel quite rightly states, this is because technically Firefox is actually just Mozilla. It's just a fancy name for it.

How about you try looking through the code for an edit yourself if it's that much of a problem. Smile

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
Rolandks



Joined: 17 Nov 2003
Posts: 11
Location: Kassel, Germany

PostPosted: Tue Nov 16, 2004 9:43 am    Post subject: Reply with quote
Thanks.
I will try it next time. I don´t think you have to change the php-Code, you have to add Fiirefox to the table "agents" (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040301, F, Linux ) and for all OS you would count.

Code:

... count(browser) as hits FROM $tbl_logs AS L


Counts the browser to agents from logs.

Roland
Back to top
View user's profile Send private message
AgentElrond



Joined: 23 Jan 2005
Posts: 2
Location: The Matrix of Rivendell

PostPosted: Sun Jan 23, 2005 7:36 pm    Post subject: Firefox detection/logging Reply with quote
Here's what I'm using, which seems to work okay (from yabd.lib.php):
Code:
$arr_brows = Array (
   'Firefox'   => 'Firefox',
.
.
.
   else if(eregi("(Firefox)/([0-9]{1,3}.[0-9]{1,2})",$agt,$st_regs))        {$st_brows = "Firefox"; $fl_ver = $st_regs[2];}

_________________
"Welcome to Rivendell, Mr. Anderson."
Back to top
View user's profile Send private message
lionel
Moderator


Joined: 09 Dec 2003
Posts: 121
Location: Costa Blanca, Spain

PostPosted: Sun Jan 23, 2005 8:09 pm    Post subject: Reply with quote
hey there Agent Smile

i tried that but got
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/sitename/public_html/libraries/yabd.lib.php on line 30

could you paste some more code of how you implented it please, i tried

Code:

$arr_brows = Array (
   'IE'   => 'Internet Explorer',
   'NS'   => 'Netscape',
   'MZ'   => 'Mozilla',
   'OP'   => 'Opera',
   'KONQ' => 'Konqueror',
   'OMNI' => 'OmniWeb',
   'ICAB' => 'iCab',
   'LX'   => 'Lynx',
   'NPOS' => 'NetPositive'
       'Firefox'   => 'Firefox',
);

$arr_sys = Array (
   'Win'       => 'Windows',
   'Win2000'   => 'Windows 2000',
   'Win95'     => 'Windows 95',
   'Win98'     => 'Windows 98',
   'WinMe'     => 'Windows Me',
   'WinXP'     => 'Windows XP',
   'WinNT'     => 'Windows NT',
   'WinNT4.0'  => 'Windows NT4',
   'Mac'       => 'Mac OS',
   'MacOSX'    => 'Mac OS X'
);

// extract agent from $HTTP_USER_AGENT ($agt)
function extract_agent($agt) {
   
   /* Browser detection */

   if     (eregi("(opera) ([0-9]{1,2}.[0-9]{1,3}){0,1}",$agt,$st_regs) ||
           eregi("(opera/)([0-9]{1,2}.[0-9]{1,3}){0,1}",$agt,$st_regs))             {$st_brows = "OP";      $fl_ver = $st_regs[2];}
   else if(eregi("(konqueror)/([0-9]{1,2}.[0-9]{1,3})",$agt,$st_regs) ||
           eregi("(konqueror)/([0-9]{1,2})",$agt,$st_regs))                         {$st_brows = "KONQ";    $fl_ver = $st_regs[2]; $st_sys = "Linux";}
   else if(eregi("(NetPositive)/([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})",$agt,$st_regs)) {$st_brows = "NPOS";    $st_ver = $st_regs[2];}
       else if(eregi("(Firefox)/([0-9]{1,3}.[0-9]{1,2})",$agt,$st_regs))                {$st_brows = "Firefox"; $fl_ver = $st_regs[2];}
Back to top
View user's profile Send private message Visit poster's website
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 929
Location: London, UK

PostPosted: Sun Jan 23, 2005 8:36 pm    Post subject: Reply with quote
Put the firefox entry at the top of the array list. It has a comma after it which causes issues if you put it at the end of the array.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
lionel
Moderator


Joined: 09 Dec 2003
Posts: 121
Location: Costa Blanca, Spain

PostPosted: Sun Jan 23, 2005 9:31 pm    Post subject: Reply with quote
yup that did the trick, thanks David Smile

and thanks Agent for the code Smile
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger Support All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.11
Theme design based on Team 101 Designs, modified by Philip Iezzi