Created
April 10, 2017 07:52
-
-
Save lav45/3a86e49127cf7db46dc9f87e4192bfbf to your computer and use it in GitHub Desktop.
Test flespi.io gateway
This file contains hidden or 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 | |
$url = 'https://flespi.io/gw/channels/{channels}/messages'; | |
$channels = implode(',', [136]); | |
$url = str_replace('{channels}', $channels, $url); | |
// $data = ['timeout' => 10]; | |
// $data = json_encode($data); | |
// $url .= '?' . http_build_query(['data' => $data]); | |
$context = stream_context_create([ | |
'http' => [ | |
'method' => 'GET', | |
'header' => 'Authorization: FlespiToken DSQUoIjSF9aUySVA9rMaP6NQ58rLUYYlGE5TaczGbyqxgbWdryb4tMLoI0XsOMDj' | |
] | |
]); | |
$result = file_get_contents($url, null, $context); | |
$result = json_decode($result, true); | |
print_r($result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment