CURL 上下文选项 — CURL 上下文选项列表
说明
CURL 上下文选项在 CURL 扩展被编译(通过 --with-curlwrappers configure选项)时可用
可选项
method string
GET,POST,或者其他远程服务器支持的 HTTP 方法。
默认为 GET.
header string
额外的请求标头。这个值会覆盖通过其他选项设定的值(如: User-agent:,Host:, ,Authentication:)。
user_agent string
设置请求时 User-Agent 标头的值。
默认为 php.ini 中的 user_agent 设定。
content string
在头部之后发送的额外数据。这个选项在 GET 和 HEAD 请求中不使用。
proxy string
URI,用于指定代理服务器的地址(例如 tcp://proxy.example.com:5100)。
max_redirects int
最大重定向次数。1 或者更小则代表不会跟随重定向。
默认为 20.
curl_verify_ssl_host bool
校验服务器。