혹시 PHP에서 IF문 쓸때
리퍼값에 examinfocenter 이 글자가 포함된 도메인은 특정도메인으로 넘기는 이프문좀 가르처 주세요^^
<?php
if ( 리터값에 naver.com이 글자가 포함된 도메인은)
{
goto_url("http://www.daum.co.k?partner_id=navine");
}
?>
답변 5개 / 댓글 2개
채택된 답변
+20 포인트
2014-09-02 (화) 22:02:36
Copy
if(stripos($_SERVER['HTTP_REFERER'], "examinfocenter")){goto_url("http://www.daum.co.k?partner_id=navine"); }
이렇게 하면 되려나요..
저도 검색 해본거라서 ^^;;
답변에 대한 댓글 2개
2014-09-02 (화) 22:30:57
2014-09-03 (수) 22:59:02
결국 해결했어요^^
많은 조언 감사드립니다
<?php
$naver = strpos($_SERVER['HTTP_REFERER'],"naver");
if($examinfo == true) {
goto_url("http://www.naver.co.kr/gnuboard4/site_map2.php");
}
?>
2014-09-02 (화) 22:47:01
<?php
if(stripos($_SERVER['HTTP_REFERER'], "examinfocenter")){
print "
<script>
location.href='http://www.daum.co.k?partner_id=navine';
</script>";
}?>
2014-09-02 (화) 22:44:52
Fatal error: Call to undefined function: goto_url() in /home/hosting_users/licenseclubicon/www/gnuboard4/x.php on line 5
2014-09-02 (화) 22:21:01
fear님이 말씀하신대로 stripos 함수를 사용하시면 되십니다.
답변을 작성하려면 로그인이 필요합니다.
에러가 나는데요^^