get_browser and $_SERVER info from an IFRAME
| From: | I.A. Gray | Date: | Wed, 14 Jul 2004 14:31:16 +0000 |
| Subject: | get_browser and $_SERVER info from an IFRAME | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-190479@lists.php.net to get a copy of this message | ||
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?