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 | |
$application_token = "abcdef12-4855-11e4-a25f-06ee74823f7d"; | |
$url = "https://www.cpd.co.uk/restapi/v1/agents/visitortoken/"; | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, $url); | |
curl_setopt($curl, CURLOPT_HTTPHEADER, array( | |
'X-CPD-Token: '.$application_token | |
)); |
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 | |
$params = array( | |
"client_id" => "683c5835a8d36a5bb974", | |
"client_secret" => "50ac9cb374989802d3d437c3fe0d7d8829c00e1b", | |
"username" => "user@theirdomain.co.uk", | |
"password" => "theirpasswordhere", | |
"grant_type" => "password", | |
); | |
$postData = ""; |
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
#!/bin/bash | |
# | |
# Returns (via stdout) the number of seconds since a file was last changed. Useful for checking a | |
# 'success' timestamp/flag file to identify a stale/dead process. | |
# | |
echo $[`date +%s` - `stat -c %Y $1`] |
NewerOlder