혹시 부라우저에 따라.. 정보
혹시 부라우저에 따라..본문
혹시 접속 브라우저에 따라 관련 보턴이 보이고 안보이고하는
기능이 있는지요?
예를들어
익스로 접속하면 단추가 보이고
그외에는 안보이고하는..
댓글 전체
lib/visit.lib.php에 있는 다음 함수를 이용해서 브라우저 체크후 화면 출력처리하면 될것 같습니다.
// get_browser() 함수는 이미 있음
function get_brow($agent)
{
$agent = strtolower($agent);
//echo $agent; echo "<br/>";
if (preg_match("/msie 5.0[0-9]*/", $agent)) { $s = "MSIE 5.0"; }
else if(preg_match("/msie 5.5[0-9]*/", $agent)) { $s = "MSIE 5.5"; }
else if(preg_match("/msie 6.0[0-9]*/", $agent)) { $s = "MSIE 6.0"; }
else if(preg_match("/msie 7.0[0-9]*/", $agent)) { $s = "MSIE 7.0"; }
else if(preg_match("/msie 4.[0-9]*/", $agent)) { $s = "MSIE 4.x"; }
else if(preg_match("/firefox/", $agent)) { $s = "FireFox"; }
else if(preg_match("/x11/", $agent)) { $s = "Netscape"; }
else if(preg_match("/opera/", $agent)) { $s = "Opera"; }
else if(preg_match("/gec/", $agent)) { $s = "Gecko"; }
else if(preg_match("/bot|slurp/", $agent)) { $s = "Robot"; }
else { $s = "기타"; }
return $s;
}
// get_browser() 함수는 이미 있음
function get_brow($agent)
{
$agent = strtolower($agent);
//echo $agent; echo "<br/>";
if (preg_match("/msie 5.0[0-9]*/", $agent)) { $s = "MSIE 5.0"; }
else if(preg_match("/msie 5.5[0-9]*/", $agent)) { $s = "MSIE 5.5"; }
else if(preg_match("/msie 6.0[0-9]*/", $agent)) { $s = "MSIE 6.0"; }
else if(preg_match("/msie 7.0[0-9]*/", $agent)) { $s = "MSIE 7.0"; }
else if(preg_match("/msie 4.[0-9]*/", $agent)) { $s = "MSIE 4.x"; }
else if(preg_match("/firefox/", $agent)) { $s = "FireFox"; }
else if(preg_match("/x11/", $agent)) { $s = "Netscape"; }
else if(preg_match("/opera/", $agent)) { $s = "Opera"; }
else if(preg_match("/gec/", $agent)) { $s = "Gecko"; }
else if(preg_match("/bot|slurp/", $agent)) { $s = "Robot"; }
else { $s = "기타"; }
return $s;
}
감사합니다.
visit.lib.php??...^^--@
이곳이 G4질답란이었다는걸 잠시..
그냥 일반글 보턴에 적용하고자
visit.lib.php??...^^--@
이곳이 G4질답란이었다는걸 잠시..
그냥 일반글 보턴에 적용하고자