PHP code example of nglasl / silverstripe-apiwesome
1. Go to this page and download the library: Download nglasl/silverstripe-apiwesome library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$validation = $service->validateToken($this->getRequest()->getVar('token'));
switch($validation) {
case APIwesomeService::VALID:
// The token matches the current security token.
break;
case APIwesomeService::INVALID:
// The token does not match a security token.
break;
case APIwesomeService::EXPIRED:
// The token matches a previous security token.
break;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.