게시글 회원당 1회만 코멘트 포인트 지급에 ip 추가 방법좀요

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
게시글 회원당 1회만 코멘트 포인트 지급에 ip 추가 방법좀요

QA

게시글 회원당 1회만 코멘트 포인트 지급에 ip 추가 방법좀요

답변 1

본문

게시글에 다른사람이 코멘트 달면 1회만 코멘트 포인트 지급 입니다.

여기에 코멘트 다는 사람과 게시글자와 아이피가 다를시에만

코멘트포인트 지급추가 할려고 합니다.

 

 

if(!sql_fetch("select wr_parent from `$write_table` where wr_parent='$wr_id' AND wr_is_comment='1' AND mb_id='$member[mb_id]' AND wr_id!='$comment_id'")) {
        insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id}-{$comment_id} 댓글쓰기", $bo_table, $comment_id, '댓글');

 }

이 질문에 댓글 쓰기 :

답변 1

ip 주소 검사를 추가하려면

 

client(browser) ip 얻는 방법

https://www.javatpoint.com/how-to-get-the-ip-address-in-php

https://stackoverflow.com/questions/15699101/get-the-client-ip-address-using-php

$client_ip= get_client_ip();

... where wr_parent='$wr_id' AND wr_is_comment='1' AND mb_id='$member[mb_id]' AND wr_id!='$comment_id'

and wr_ip!='$client_ip'

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
  • 질문이 없습니다.
전체 0
© SIRSOFT
현재 페이지 제일 처음으로