DETERMINER LE SYSTÈME D'EXPLOITATION D'UN VISITEUR
Neozix
Messages postés33Date d'inscriptionmercredi 27 février 2002StatutMembreDernière intervention25 avril 2003
-
21 août 2003 à 19:29
webdeb
Messages postés488Date d'inscriptionsamedi 5 avril 2003StatutMembreDernière intervention31 mars 2009
-
9 avril 2007 à 23:59
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
cs_miata
Messages postés86Date d'inscriptionmardi 31 août 2004StatutMembreDernière intervention19 août 2008 9 avril 2007 à 23:17
Surement, ce n'est pas la premiere fois que l'on me le suggère ...
Mais comment on fait au fait ?
webdeb
Messages postés488Date d'inscriptionsamedi 5 avril 2003StatutMembreDernière intervention31 mars 20094 9 avril 2007 à 22:39
En plaçant les valeurs possibles dans un tableau ce serait quand même plus intelligent non ?
cs_miata
Messages postés86Date d'inscriptionmardi 31 août 2004StatutMembreDernière intervention19 août 2008 29 déc. 2006 à 13:38
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 5.2")) {echo "Windows Server 2003";}
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 6.0")) {echo "Windows Vista";}
peoplehard
Messages postés26Date d'inscriptionsamedi 26 avril 2003StatutMembreDernière intervention26 novembre 2008 11 févr. 2004 à 15:55
Ou aussi:
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 5.1")) {
echo "Windows XP";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 5.0")) {
echo "Windows 2000";
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows 98")) {
echo "Windows 98";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows 95")) {
echo "Windows 95";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Linux")) {
echo "Linux";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Unix")) {
echo "Unix";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "FreeBSD")) {
echo "FreeBSD";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Mac")) {
echo "Macintosh";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Apple")) {
echo "Apple";
}
}
}
}
}
}
}
}
}
Neozix
Messages postés33Date d'inscriptionmercredi 27 février 2002StatutMembreDernière intervention25 avril 2003 21 août 2003 à 19:29
9 avril 2007 à 23:59
9 avril 2007 à 23:17
Mais comment on fait au fait ?
9 avril 2007 à 22:39
29 déc. 2006 à 13:38
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 6.0")) {echo "Windows Vista";}
11 févr. 2004 à 15:55
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 5.1")) {
echo "Windows XP";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows NT 5.0")) {
echo "Windows 2000";
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows 98")) {
echo "Windows 98";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Windows 95")) {
echo "Windows 95";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Linux")) {
echo "Linux";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Unix")) {
echo "Unix";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "FreeBSD")) {
echo "FreeBSD";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Mac")) {
echo "Macintosh";
}else{
if (strstr($_SERVER["HTTP_USER_AGENT"], "Apple")) {
echo "Apple";
}
}
}
}
}
}
}
}
}
21 août 2003 à 19:29