First you need to analyze what this line does:
$ curl -H "Authorization: 622cee5f8c99c81e87614e9efc63eddb" https://api.service.com/member
It is not complicated, you will find all the switches explained on the curl manpage :
-H, --header <header>: (HTTP) An optional header to use when retrieving a web page. You can specify any number of additional headers. [...]
You can add a header through curl_setopt_array Docs in PHP (all available parameters are explained in the curl_setopt Docs ):
$ch = curl_init('https://api.service.com/member');
$options = array(
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => array("Authorization: 622cee5f8c99c81e87614e9efc63eddb"),
);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
curl PHP-HTTP-, , ( , ):
$options = array('http' => array(
'header' => array("Authorization: 622cee5f8c99c81e87614e9efc63eddb"),
));
$context = stream_context_create($options);
$result = file_get_contents('https://api.service.com/member', 0, $context);