Created
September 12, 2017 08:19
-
-
Save Halleck45/f316b4602f3b82dc9b9ffdddd39e7994 to your computer and use it in GitHub Desktop.
Youbora support
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 | |
// This file concerns Youbora support | |
$secretKey = 'mysecret'; | |
$system = 'system' | |
$url = '/quality/top?system='.$system.'&timezone=Europe/Paris&type=&asc=true&orderBy=plays&startDate=&endDate='; | |
$expirationTime = round(microtime(true) * 1000) + 1800000; | |
$preurl = $url . "&dateToken=".$expirationTime; | |
$token = md5($preurl.$secretKey); | |
// tried with | |
//$url = 'https://api.youbora.com/'.$preurl; | |
$url = 'http://ws.analytics.nicepeopleatwork.com'.$preurl. '&token=' . $token; | |
var_dump($url); | |
var_dump(file_get_contents($url)); | |
/* | |
getting: | |
string 'http://ws.analytics.nicepeopleatwork.com/quality/top?system=radiofrance&timezone=Europe/Paris&type=&asc=true&orderBy=plays&startDate=&endDate=&dateToken=1505205917032&token=0a62fbbe6d0fc0c40bef7e5df4dc4360' (length=205) | |
string '{"errorcode": 3002,"errormsg": "Invalid token."}' (length=48) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment