cURL → PHP

Convert a cURL command into a PHP curl snippet.

Runs entirely in your browser

FAQ

Which PHP curl style is used?
The imperative curl_init / curl_setopt / curl_exec flow because it's the most widely available. CURLOPT_RETURNTRANSFER is set so $response holds the body.
Are headers sent as CURLOPT_HTTPHEADER?
Yes, as an array of 'Key: value' strings — the format PHP's curl extension expects.

Related tools