Using cURL in PHP

suggest change

Syntax

Since PHP 8, curl_init() returns a CurlHandle object, not a resource. The signatures above are the PHP 7 forms.

Parameters

Parameter Details
curl_init – Initialize a cURL session
url The url to be used in the cURL request
curl_setopt – Set an option for a cURL transfer
ch The cURL handle (return value from curl_init())
option CURLOPT_XXX to be set - see PHP documentation for the list of options and acceptable values
value The value to be set on the cURL handle for the given option
curl_exec – Perform a cURL session
ch The cURL handle (return value from curl_init())
curl_close – Close a cURL session
ch The cURL handle (return value from curl_init())

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents