- file_get_contents: documentation ( source)
- stream_context_create: documentation ( source)
- base64_encode: documentation ( source)
<?php
$opts = array('http' =>
array( 'method' => "GET",
'header' => "Authorization: Basic ". base64_encode('britInfoPUB:bcac9a90f4d5109cba0d726696a43f14') .
""));
$context = stream_context_create($opts);
// Open the file using the HTTP headers set above
$file = file_get_contents('https://api-sandbox-evvnt.herokuapp.com/events?max_results=1', false, $context);
echo $file;
?>