찾다

 >  Q&A  >  본문

file_get_contents는 데이터를 얻기 위해 쿠키를 전달하고 이를 서버에 배포하지만 실패합니다.

$url = 'https://www.ssldun.cn/clientarea.php?action=productdetails&id=2&modop=custom&a=DownloadCert';$con = 'WHMCSy551iLvnhYt7=382h2f4u8eo25oiovc9p2ffsu3';$rand = rand(10000,99999);/ /난수 $filename= time().$rand.'.zip';//압축 패키지 이름을 가져오기 위해 요청 보내기 삭제 필요 //압축 패키지 내용을 가져오기 위해 쿠키와 함께 요청 보내기 $opts = array('http' => ; array('header'=> '쿠키:'.@$con.''));$context = stream_context_create($opts);$contents = file_get_contents($url, false, $context);var_dump($contents );

단, 이 코드를 서버에 배포하면 파일을 얻을 수 없습니다

夜幕夜幕1336일 전879

모든 응답(1)나는 대답할 것이다

  • ?小虾米

    ?小虾米2021-06-09 20:03:00

    반환된 결과는 무엇인가요? 오류 메시지가 있나요?

    회신하다
    0
  • 취소회신하다