Skip to content

Instantly share code, notes, and snippets.

@literalplus
Last active April 30, 2020 15:05
Show Gist options
  • Save literalplus/7d284e61d313b11924c8b1902f002bde to your computer and use it in GitHub Desktop.
Save literalplus/7d284e61d313b11924c8b1902f002bde to your computer and use it in GitHub Desktop.
PHP 7.4.4 curl multiline headers
# copied from webhook.site using copy as curl
curl -X 'GET' 'https://webhook.site/d34983e4-f375-4bda-9c14-ae4d9738a113' -H 'connection: close' -H 'x-yolo: true' -H 'content-type: application/pdf' -H 'accept: */*' -H 'host: webhook.site' -H 'content-length: '
<html>
<head><title>strache</title></head>
<body
<?php
$URL = "https://webhook.site/d34983e4-f375-4bda-9c14-ae4d9738a113";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $URL);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/pdf\r\nX-Yolo: true"));
curl_exec($curl);
echo "hell";
echo var_dump($curl);
echo "lol";
?>
hehe
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment