Ответы пользователя по тегу Apache HTTP Server
  • Почему php требует ssl сертификат?

    @seopublic
    function file_get_contents_curl( $url ) {
    
      $ch = curl_init();
    
      curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
      curl_setopt( $ch, CURLOPT_HEADER, 0 );
      curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
      curl_setopt( $ch, CURLOPT_URL, $url );
      curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );
    
      $data = curl_exec( $ch );
      curl_close( $ch );
    
      return $data;
    
    }


    Затем просто используйте file_get_contents_curl вместо file_get_contents всякий раз, когда вы вызываете URL-адрес, начинающийся с https.
    Ответ написан
    Комментировать