34 lines
1013 B
PHP
34 lines
1013 B
PHP
|
|
<?php
|
||
|
|
/*
|
||
|
|
API ID: af98db4e-0197-4c05-903e-b862d76eff48
|
||
|
|
API KEY: key-d-c517285c-e4c9-467a-8e70-bdf4be3a2605
|
||
|
|
API Secret: secret-d-4aa58055-4bcd-4902-968d-ddb0bb21c7c5
|
||
|
|
*/
|
||
|
|
|
||
|
|
$ch = curl_init();
|
||
|
|
|
||
|
|
// Set URL to download
|
||
|
|
curl_setopt($ch, CURLOPT_URL, "https://oauth.sandbox.verifymycontent.com/oauth/authorize?client_id=key-d-c517285c-e4c9-467a-8e70-bdf4be3a2605");
|
||
|
|
$postRequest = array(
|
||
|
|
'client_id ' => 'af98db4e-0197-4c05-903e-b862d76eff48',
|
||
|
|
'scope'=>'identity-check',
|
||
|
|
'redirect_uri '=>'http://localhost',
|
||
|
|
'country '=>'gb'
|
||
|
|
);
|
||
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $postRequest);
|
||
|
|
// Include header in result? (0 = yes, 1 = no)
|
||
|
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||
|
|
|
||
|
|
// Should cURL return or print out the data? (true = return, false = print)
|
||
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||
|
|
|
||
|
|
// Timeout in seconds
|
||
|
|
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||
|
|
|
||
|
|
// Download the given URL, and return output
|
||
|
|
$output = curl_exec($ch);
|
||
|
|
|
||
|
|
// Close the cURL resource, and free system resources
|
||
|
|
curl_close($ch);
|
||
|
|
var_dump($output);
|
||
|
|
?>
|