经测试代码如下:
/**
* 检测客户端是iphone或者ipod
*
* @param
* @arrange (512.笔记) jb51.cc
**/
if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod'))
{
header('Location: http:// yoursite.com/iphone');
exit();
}
/*** 代码来自编程之家 jb51.cc(jb51.cc) ***/
原文链接:https://www.f2er.com/php/528844.html