call file_get_content() function with headers
First we create an array with the headers
$opts = [
	"http" => [
		"method" => "GET",
		"header" => 
			"Channel-Name: ".CHANNEL."\r\n" .
			"Authorization: ".AUTHORIZATION."\r\n"
	]
];
// Then we create a stream
$context = stream_context_create($opts);
Then we pass the
$content
to
file_get_contents()
function as the
third
parameter
$result = file_get_contents($url, false, $context);
by Valeri Tandilashvili
3 years ago
PHP
functions
1
Pro tip: use ```triple backticks around text``` to write in code fences