首页 \ 问答 \ 可以列出zip / rar文件内容的PHP库[已关闭](PHP library that can list contents of zip / rar files [closed])

可以列出zip / rar文件内容的PHP库[已关闭](PHP library that can list contents of zip / rar files [closed])

注意:我需要一个库不链接到关于我的主机没有或想要安装的扩展的文档。

主题说了这一切。

我暂时不需要提取任何文件(尽管之后这可能是一个很好的补充)我只需要列出rar和zip存档的内容。


Note: I NEED A LIBRARY not links to documentation about extensions my host doesn't have or want installed.

The subject says it all.

I don't need to extract any files for the moment (although that might be a nice addition to my web app later) I just need to list the contents of rar and zip archives.


原文:https://stackoverflow.com/questions/1524186
更新时间:2023-05-18 10:05

最满意答案

尝试使用详细输出-v )从OS X bash使用curl 。 它应该为您提供有关CA cURL正在使用的信息,正如文档在详细部分中所述

如果我们使用HTTPS:// URL而不是HTTP URL,那么还会有一大堆行解释curl如何使用CA证书来验证服务器的证书以及服务器证书中的一些细节等。包括选择了哪些密码以及更多TLS细节。

编辑:以下是我在“限制”下的评论解释:

DarwinSSL:如果验证值为0,则SNI也被禁用。 SNI是一个TLS扩展,它将主机名发送到服务器。 服务器可以使用该信息来执行诸如发回主机名的特定证书或将请求转发到特定源服务器之类的事情。 如果未发送SNI,则某些主机名可能无法访问。

这里的问题是cURL使用DarwinSSL用于OS X,当CURLOPT_SSL_VERIFYHOST设置为0时,它对某些主机名有限制。尝试发送请求而不禁用这两个选项。


Try using curl from OS X bash using verbose output (-v). It should give you information about the CA cURL is using, as docs say in the verbose section:

If we use an HTTPS:// URL instead of an HTTP one, there will also be a whole bunch of lines explaining how curl uses CA certs to verify the server's certificate and some details from the server's certificate, etc. Including which ciphers were selected and more TLS details.

EDIT: here is the explanation for my comment below, under "Limitations":

DarwinSSL: If verify value is 0, then SNI is also disabled. SNI is a TLS extension that sends the hostname to the server. The server may use that information to do such things as sending back a specific certificate for the hostname, or forwarding the request to a specific origin server. Some hostnames may be inaccessible if SNI is not sent.

The problem here is that cURL uses DarwinSSL for OS X, which has a limitation with some hostnames when CURLOPT_SSL_VERIFYHOST is set to 0. Try to send the request without disabling those two opts.

相关问答

更多
  • curl 7.19.7(x86_64-redhat-linux-gnu)libcurl / 7.19.7 NSS / 3.19.1基本ECC zlib / 1.2.3 libidn / 1.18 libssh2 / 1.4.2 你正在使用一个非常旧的卷曲版本。 我的猜测是,你遇到了6年前描述的bug 。 修正是更新你的卷曲。 curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/ ...
  • 我会猜测你对所有的请求都使用了一个CURL句柄(因为你说“我创建并初始化了实际的curl句柄”)。 该解决方案最有可能为每个使用curl_easy_perform()完成的请求创建一个CURL句柄,然后直接curl_easy_cleanup()。 你看到的可能是由服务器关闭SSL连接引起的。 但是您的CURL句柄可能会保持原样(即完成握手),这不再合适。 I'm going to guess that you're using a single CURL handle for all your reques ...
  • 那么,因为这个帖子不好,我不得不自己深入研究。 另外查看有关其他版本等的其他答案和意见。 编辑:自从我发布了这个Q,似乎有一些现成的二进制文件从卷曲主页提供。 看看詹姆斯的回答 。 所以这里: - 预处理器 需要将以下两个符号提供给预处理器以启用libcurl的SSL: USE_SSLEAY USE_OPENSSL (libcurl使用OpenSSL进行SSL支持) 或者,这些符号可以直接添加到libcurl中的一个名为setup.h的文件中,但是我不太乐意修改第三方发行版中的代码,除非我真的需要。 重建 ...
  • 不幸的是,这只是一个半答案。 首先,我没有,但仍然没有达到为什么打开CURLOPT_VERBOSE似乎什么都不做的底部。 将CURLOPT_VERBOSE设置为1L似乎不会改变任何内容。 但是,我确实设法找到了我遇到的问题的根源。 我将新编译的cUrl库分离到一个新项目中,并意识到来自TwitCurl的另一个/更旧的cUrl库仍然挂在我的系统上,还有一些用于SSL / TLS协议的库。 这最终干扰了新编译的cUrl库,导致它无法找出可用的协议。 所以......我想我可以给出的最好的建议是如果可能的话,进一 ...
  • 使用套接字HTTP处理程序的步骤 以下是我需要做的工作: 安装.NET Core SDK 2.1.xxx-preview 更新项目AspNetCore.All参考 将包源添加到NuGet.Config 设置环境变量 安装.NET Core SDK [2.1.xxx-preview] 下载并安装macOs安装程序 更新项目AspNetCore.All参考 更新包参考:
    尝试使用详细输出 ( -v )从OS X bash使用curl 。 它应该为您提供有关CA cURL正在使用的信息,正如文档在详细部分中所述 : 如果我们使用HTTPS:// URL而不是HTTP URL,那么还会有一大堆行解释curl如何使用CA证书来验证服务器的证书以及服务器证书中的一些细节等。包括选择了哪些密码以及更多TLS细节。 编辑:以下是我在“限制”下的评论解释: DarwinSSL:如果验证值为0,则SNI也被禁用。 SNI是一个TLS扩展,它将主机名发送到服务器。 服务器可以使用该信息来执行 ...
  • 您设置了错误的SSL版本: curl_setopt($ch, CURLOPT_SSLVERSION, 4); Paypal沙箱仅支持TLS 1.2 (CURLOPT_SSLVERSION == 6)。 如果您使用PHP 5.5.19+和OpenSSL 1.0.1+,将自动使用正确的SSL版本,或者您可以使用以下内容强制使用它(仍需要OpenSSL 1.0.1+): curl_setopt($ch, CURLOPT_SSLVERSION, 6); I was able to solve this proble ...
  • SSL握手失败。 一些潜在的原因: 你用gnutls而不是openssl编译。 试试: apt-get install libcurl4-openssl-dev 。 您的libcurl确实已过时,不支持服务器所需的TLS版本。 The SSL handshake fails. Some potential reasons: You compiled with gnutls instead of openssl. Try: apt-get install libcurl4-openssl-dev. Your ...
  • 我正在使用cURL日志记录。 它以这种方式打开: curl_easy_setopt(m_curl_session, CURLOPT_DEBUGFUNCTION, curl_debug_trace)在函数开头curl_debug_trace日志文件由fopen ,最后用fclose关闭。 在发布模式下,由于某些原因,它不会关闭文件和进程运行以限制打开的文件,并且无法打开cacert文件。 解决方案是一次性打开日志文件并保持打开状态直到程序运行。 I'm using cURL logging. It is tu ...
  • 请阅读SSL_ *函数的文档:您不应使用strerror,而应使用SSL_get_error(retVal)来获取SSL_connect的SSL错误代码。 根据错误代码,您需要使用ERR_get_error来访问错误队列,并使用ERR_error_string来获取错误的字符串表示。 Please read the documentation of the SSL_* functions: You should not use strerror, but SSL_get_error(retVal) to g ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。