Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

analysing header() information in PHP

Status
Not open for further replies.

chromonium

Programmer
Jun 4, 2002
36
FR
dear experts,

do any of you know whether it is possible to analse the header information given out by the clients browser in PHP4? This would be to set session vars to maintain site wide compatibility with older browsers.

many regards

adam
 
Yup its easy here is an example :

Code:
<?php

$agt = $HTTP_USER_AGENT;

if ($agt == &quot;IE&quot;) {
    $sesVar = &quot;IE&quot;;
} else if ($agt == &quot;NS&quot;) {
    $sesVar = &quot;NS&quot;;
}

?>
Regards

David Byng

spider.gif


davidbyng@hotmail.com

while (Me < Drunk) {
Beer++
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top