[nycphp-talk] Anyone ever have any luck with get_browser?
Analysis & Solutions
danielc at analysisandsolutions.com
Fri May 30 12:25:52 EDT 2003
On Fri, May 30, 2003 at 12:15:23PM -0400, soazine at pop.erols.com wrote:
> I am using the PHP manual itself to define the get_browser() object as an
> array. However, when I do it I get the following error:
>
> Warning: Invalid argument supplied for foreach() in
> /users/ppowell/web/profile/display.php on line 8
But what happens if you do
<?php
$browser = get_browser();
print_r($browser);
?>
I'll bet not much, since it seems from the message that $browser isn't an
array. So, if that's the case, it means get_browser() isn't working right
for you.
> I hope this gives a more thorough background of what I have done to try to
> determine the user's browser Javascript setting.
Of course, you realize, that just because a browser CAN use JavasCrap,
doesn't mean the person has it enabled. And that relying on JS for
essential things can lead to your site being unusable for such people.
See my rant at http://www.analysisandsolutions.com/code/weberror.htm about
this if you care.
--Dan
--
FREE scripts that make web and database programming easier
http://www.analysisandsolutions.com/software/
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list