PHP version 4.027
I want to change between style sheets when page is viewed on a mobile phone or a PC.
The pages looks fine on both when I manually set a key in the script.
My problem is how to determine if its viewed on a phone or PC.
I have used $_SERVER['HTTP_USER_AGENT']; to show the browser details
RESULTS from php pages.
HTC Mobile phone;
HTC_Pro_T7272 Opera/9.50 (windows NT5.1;U; en)
My PC;
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
I'm not sure how to tell from these results what is what.
I can see I can pick out the HTC_Pro string to set my key, but that would not be there on a different make of phone.
If phone or PC cannot be determined from $_SERVER['HTTP_USER_AGENT']; have you any idea how.
Thanks in advance, Barry.