n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/t.php

17 lines
331 B
PHP
Raw Permalink Normal View History

2023-04-30 21:28:42 +02:00
<?php
$brands = array ("ipod","siemens","htc","samsung","sony","blackberry","nokia","iphone");
for($i = 0; ($i < 8) && (stristr($_SERVER['HTTP_USER_AGENT'], $brands[$i]) == false); $i++);
if ($i <= 7)
{
echo("c'est un mobile");
}
else
{
echo("ce n'est pas un mobile");
}
//print_r(explode(" ",$_SERVER['HTTP_USER_AGENT']));
?>