cURL Context Options in PHP



Introduction

CURL context options are available when the CURL extension was compiled using the --with-curlwrappers configure option. Given below is list of CURL wrapper context options

Method Description
method HTTP method supported by the remote server. Defaults to GET.
header Additional headers to be sent during request
user_agent Value to send with User-Agent: header.
content Additional data to be sent after the headers. This option is not used for GET or HEAD requests.
proxy URI specifying address of proxy server.
max_redirects The max number of redirects to follow. Defaults to 20.
curl_verify_ssl_host Verify the host. Defaults to FALSE. available for both http and ftp protocol wrappers.
curl_verify_ssl_peer Require verification of SSL certificate used. Defaults to FALSE. available for both http and ftp protocol wrappers.
Updated on: 2020-11-13T12:18:12+05:30

414 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements