I need to display additional information on a web page (PHP) if one of the following criteria is met:
- .NET Framework Installed on the client machine in lower than 3.5
- Impossible to determine if .NET Framework 3.5 is installed or not on the client machine
I know that some browser (if not only one, IE) is sending that information in his tag.
Can any of you provide me with his suggestions ?
Website is built in PHP.
Thanks!
EDIT:
Proposed answers are incomplete and/or don't provide me with a robust solution.
The only way to get this information is from the
user agent
that the browser sends. You can parse the .NET version from there. But note that client can spoof this information or omit it completely, so I wouldn't base any critical functionality on this.Info about .NET CLR versions in the UserAgent:
Here is another version I actually made for a friend of mine and realised that there was a bounty on this thread so what the hell :)
This is fully working but only with User-agent strings as there is no alternative means of doing so.
The core class:
Example Usage:
If you also want to check custom UA Strings from DB lets say
I would try and do a strstr on the UserAgent in PHP, Example Below
A .NET User Agent :
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Pivim Multibar; GTB6.4; .NET CLR 2.0.50727)
The PHP:
I would also check out the following PEAR Package : http://pear.php.net/package/Net_UserAgent_Detect ?>