function Route_Action($app){
$app->get('/request/{token}/{id}/{cmd}', function ($request, $response, $args) {
echo CurrentTime();
exit();
});
}
Here I get the wrong Time
but on other page the CurrentTime(); shows the correct time.
function Route_Action($app){
$app->get('/request/{token}/{id}/{cmd}', function ($request, $response, $args) {
echo CurrentTime();
exit();
});
}
Here I get the wrong Time
but on other page the CurrentTime(); shows the correct time.
Thanks
It is working now.
I want to call the "request" only from one domain i.e. http://mydomain.com
How can I block all other access for security.
You may use API custom header and API Access-Control-Allow-Origin. Also read mdn web docs on Access-Control-Allow-Origin.