Last active
February 3, 2017 06:30
-
-
Save MarkoKaartinen/4f24120896b7eea731188af095de3c91 to your computer and use it in GitHub Desktop.
Lyhyt.fi esimerkki (test)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ch = curl_init('https://lyhyt.fi/api/test'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
// headers | |
$headers = [ | |
'Authorization: Bearer APITOKEN', | |
'Accept: application/json' | |
]; | |
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); | |
$response = curl_exec($ch); | |
curl_close($ch); | |
echo "<pre>"; | |
print_r($response); | |
echo "</pre>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment