<?php
echo '<html><head></head><body>';
$user= $_SERVER['HTTP_USER_AGENT'];
if (eregi(iPhone,$user)){
echo 'this is an iPhone';
}elseif(eregi(iPod,$user)){
echo 'this is an iPod';
}else{
echo 'this is not an iPhone nor iPod';
}
echo '</body></html>';
exit;
?>