php 이미지 데이터 로그 수집

 

php 코드

$file_path = "./";
$file_name = $_GET['file_name'];
$filesize =filesize("$file_path.$file_name");

if( !file_exists( $file_path ) ) { echo "경로가 잘못되었습니다."; }
else{
  header("Content-Type: image/jpeg");  // 이 부분 jpg를 jpeg로 수정함
  header("Content-length: {$filesize}");
  header("Content-Disposition: inline; filename={$file_name}");
  readfile($file_path.$file_name);
}

 

 

네이버 원

$(".btn_copyImg").click(function(e){

    e.preventDefault();

    var copyNo = $(this).attr("data-no");

    var selectObj = document.getElementById("copyText"+copyNo);

    selectRange(selectObj);

    document.execCommand("Copy");

    alert("복사 되었습니다.");

});


function selectRange(obj) {
    if(window.getSelection){
        var selected = window.getSelection();
            selected.selectAllChildren(obj);
        //console.log(selected.toString());
    }else if(document.body.createTextRange) {
        var range = document.body.createTextRange();
            range.moveToElementText(obj);
            range.select();
        //alert(range.htmlText);
    }
};

 

 

참고 링크

https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_function&wr_id=431612&sca=&sfl=wr_subject&stx=img&sop=and 

 

https://viewridge.co.kr/home/guide_counter.html

 

댓글

Designed by JB FACTORY