Re: [PHP] get_browser error
On Fri, Aug 3, 2012 at 9:42 AM, admin ad...@buskirkgraphics.com wrote: Anyone using Get_browser() notice that IE 9 is reporting as IE 7? I am aware of compatibility mode in IE 9 but that should not change the version information sent will it? My guess is that it would, in fact, because it would send its user-agent string as the previous version. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser and $_SERVER info from an IFRAME
I.A. Gray wrote: Hi, I have a php webstats script that puts info into a MYSQL database. I include it at the top of each page that I have. But is it really needed? surely a web log analyser is more efficient . If your hosting company does not provide you access to raw log files you are being ripped off. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned]
As Richard Davey has pointed out - there is no reason why your approach in itself would cause the error message you are getting. I did a similar thing with a site I created and was plagued with similar error messages but the problem wasn't due to sessions but due to the way in which I tried to add a different header section to the scripts. This isn't straightforward with PhpBB because of the way in which some of the scripts use redirects. Perhaps this is causing the problem. HTH, Michael Egan -Original Message- From: I.A. Gray [mailto:[EMAIL PROTECTED] Sent: 14 July 2004 15:31 To: [EMAIL PROTECTED] Subject: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned] Hi, I have a php webstats script that puts info into a MYSQL database. I include it at the top of each page that I have. I recently put a php built forum (PHPBB) on our website and wanted to include the php script at the top of that. Unfortunately as it already uses sessions, I kept on getting 'headers already sent' error messages for obvious reasons- I was using sessions and so was PHPBB. I thought a good way round this would be to have an IFRAME on each of the forum pages where the IFRAME would be the PHP webstats page. The only problem with this is that it logs the information of the IFRAME and not the main page. I use get_browser and $_SERVER to log things such as the IP address, browser, os, and work out the country and the name of the page being looked at. $browser = get_browser(); $parenty = $browser-parent; $browsery = $browser-platform; $crawlery = $browser-crawler; $cookiesy = $browser-cookies; $pathy = $_SERVER['REQUEST_URI']; $ipy = $_SERVER['REMOTE_ADDR']; $hosty = gethostbyaddr($_SERVER['REMOTE_ADDR']); All these will return details for the IFRAME. How do i get details of the main page? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email (and in any attachments sent with it) is confidential. It is intended for the addressee only. Access to this email by anyone else is unintended and unauthorized. If you are not the original addressee, 3tc asks you to please maintain confidentiality. If you have received this email in error please notify 3tc immediately by replying to it, then destroy any copies and delete it from your computer system. Any use, dissemination, forwarding, printing or copying of this email by anyone except the addressee in the normal course of his/her business, is strictly prohibited. 3tc owns the copyright in this email and any document created by us and assert the right to be identified as the author of it. Copyright has not been transferred to the addressee. We protect our systems with Sophos Anti-virus - www.sophos.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned]
I can understand why somebody would want to capture the information in this way. There are a lot of hosting companies which offer packages that don't necessarily include such stats. I might be wrong - I frequently am :-( - but is it also not the case that by tying this information into sessions you get a better profile of unique visitors to the site which is often difficult to obtain from some of the access logs? Michael Egan -Original Message- From: raditha dissanayake [mailto:[EMAIL PROTECTED] Sent: 14 July 2004 16:22 To: I.A. Gray Cc: [EMAIL PROTECTED] Subject: Re: [PHP] get_browser and $_SERVER info from an IFRAME[Scanned] I.A. Gray wrote: Hi, I have a php webstats script that puts info into a MYSQL database. I include it at the top of each page that I have. But is it really needed? surely a web log analyser is more efficient . If your hosting company does not provide you access to raw log files you are being ripped off. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email (and in any attachments sent with it) is confidential. It is intended for the addressee only. Access to this email by anyone else is unintended and unauthorized. If you are not the original addressee, 3tc asks you to please maintain confidentiality. If you have received this email in error please notify 3tc immediately by replying to it, then destroy any copies and delete it from your computer system. Any use, dissemination, forwarding, printing or copying of this email by anyone except the addressee in the normal course of his/her business, is strictly prohibited. 3tc owns the copyright in this email and any document created by us and assert the right to be identified as the author of it. Copyright has not been transferred to the addressee. We protect our systems with Sophos Anti-virus - www.sophos.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get_browser() - browscap.ini for Linux
On Wed, 10 Mar 2004, Shaunak Kashyap wrote: I downloaded the file from www.GaryKeith.com and set up the php.ini entry to point to it. Then I called get_browser() and it returned nothing. Once again, my configuration is as under: OS: Linux Red Hat Enterprise WS PHP: 4.2.3 Web server: Apache 1.3.29 Have you tried using PHP's get_browser function? If that worked for you, could you please let me know what your system configuration is? Thanks, Shaunak The following code using get_browser() (in this case to detect Netscape version 4, or earlier) works for me. Don't know that it is an example of 'elegant' coding, but it does work. :) $browser = get_browser(); $isNS4 = false; if ($browser-browser == 'Netscape') { if ($browser-majorver = 4) { $isNS4 = true; } } lk www.theNewAgeSite.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get_browser() - browscap.ini for Linux
Shaunak Kashyap mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 11:21 AM said: I am running Apache 1.3.29 on a Linux platform. I am trying to use PHP's get_browser function which needs a file called browscap.ini on the server. It *seems* that there is no such file available for Linux (I have checked the manual and the link that it mentions). Can anyone point me to a source for a working, up-to-date Linux version of browscap.ini i'm just guessing with this but are you sure you need a linux version of browscap.ini? afaik it's just a plain text file. chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser() - browscap.ini for Linux
On Wed, Mar 10, 2004 at 02:21:19PM -0500, Shaunak Kashyap wrote: I am running Apache 1.3.29 on a Linux platform. I am trying to use PHP's get_browser function which needs a file called browscap.ini on the server. It *seems* that there is no such file available for Linux (I have checked the manual and the link that it mentions). Can anyone point me to a source for a working, up-to-date Linux version of browscap.ini Thanks in advance, Shaunak I pick up mine from http://www.GaryKeith.com and use it fine under Linux. -- Jim Kaufman Linux Evangelist public key 0x6D802619 http://www.linuxforbusiness.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get_browser() - browscap.ini for Linux
Thanks for the prompt reply. I downloaded the file from www.GaryKeith.com and set up the php.ini entry to point to it. Then I called get_browser() and it returned nothing. Once again, my configuration is as under: OS: Linux Red Hat Enterprise WS PHP: 4.2.3 Web server: Apache 1.3.29 Have you tried using PHP's get_browser function? If that worked for you, could you please let me know what your system configuration is? Thanks, Shaunak -Original Message- From: James Kaufman [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 3:31 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] get_browser() - browscap.ini for Linux On Wed, Mar 10, 2004 at 02:21:19PM -0500, Shaunak Kashyap wrote: I am running Apache 1.3.29 on a Linux platform. I am trying to use PHP's get_browser function which needs a file called browscap.ini on the server. It *seems* that there is no such file available for Linux (I have checked the manual and the link that it mentions). Can anyone point me to a source for a working, up-to-date Linux version of browscap.ini Thanks in advance, Shaunak I pick up mine from http://www.GaryKeith.com and use it fine under Linux. -- Jim Kaufman Linux Evangelist public key 0x6D802619 http://www.linuxforbusiness.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser();
Greg Donald wrote: Use this to identify Netscape 4.x: if(strstr($HTTP_USER_AGENT,Mozilla/4) !strstr($HTTP_USER_AGENT,MSIE)){ // is Netscape 4 } else { // is something else } Is that going to catch the Mozilla spoofers, like webtv and opera? Err, no... if they are being spoofed then why would it? Open a phpinfo() page in each of the browsers you wish to correctly identify, then you can see what user agent you need to search for to do whatever with... :) Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ I don't need to take those steps. I do have a complet browser list. The problm with using plain browser detection, it doesn't work if your trying to disallow browser that do not or do poor CCS and advanced scripting. The only way is to see if they is to see if they can preform advanced scripting by using. if (document.getElementById document.createElement). If your checking for only CSSS you can skip document.createElement it is only for Opera 5. Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get_browser();
Have you got the browscap.ini file installed properly ? and have you got a up to date version of browscap.ini ? and What is reported by IE visitng the script ? Alastair -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: 18 February 2002 17:48 To: [EMAIL PROTECTED] Subject: [PHP] get_browser(); The following example that is in the onsite documentation: ? function list_array ($array) { while (list ($key, $value) = each ($array)) { $str .= b$key:/b $valuebr\n; } return $str; } echo $HTTP_USER_AGENThr\n; $browser = get_browser(); echo list_array ((array) $browser); ? Isn't working as described in the example output provided on the page. In fact, half the time, get_browser() is returning nothing. And HTTP_USER_AGENT is only returning: Mozilla/4.7 [en] (Win95; I) for Netscape. Why isn't it (get_browser()) providing all the information as displayed in the example provided in the docs? Ultimately, I'm trying to figure out how I can determine if the user is using NS 4.x or not... Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser();
On Monday, February 18, 2002, at 12:47 PM, Chris Boget wrote: Isn't working as described in the example output provided on the page. In fact, half the time, get_browser() is returning nothing. And HTTP_USER_AGENT is only returning: Mozilla/4.7 [en] (Win95; I) for Netscape. Why isn't it (get_browser()) providing all the information as displayed in the example provided in the docs? Ultimately, I'm trying to figure out how I can determine if the user is using NS 4.x or not... Hm. I don't have the exact answer to your question, but keep in mind that this kind of information depends on the user-agent -- you're not guaranteed to get any information, as some user-agents handle headers in nonconformant ways. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser();
Ultimately, I'm trying to figure out how I can determine if the user is using NS 4.x or not... Use this to identify Netscape 4.x: if(strstr($HTTP_USER_AGENT,Mozilla/4) !strstr($HTTP_USER_AGENT,MSIE)){ // is Netscape 4 } else { // is something else } Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser();
Greg Donald wrote: Ultimately, I'm trying to figure out how I can determine if the user is using NS 4.x or not... Use this to identify Netscape 4.x: if(strstr($HTTP_USER_AGENT,Mozilla/4) !strstr($HTTP_USER_AGENT,MSIE)){ // is Netscape 4 } else { // is something else } Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ Is that going to catch the Mozilla spoofers, like webtv and opera? Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get_browser();
Use this to identify Netscape 4.x: if(strstr($HTTP_USER_AGENT,Mozilla/4) !strstr($HTTP_USER_AGENT,MSIE)){ // is Netscape 4 } else { // is something else } Is that going to catch the Mozilla spoofers, like webtv and opera? Err, no... if they are being spoofed then why would it? Open a phpinfo() page in each of the browsers you wish to correctly identify, then you can see what user agent you need to search for to do whatever with... :) Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php