rox.php 437 B

12345678910
  1. <?php
  2. $app->get('/rox', function ($request, $response, $args) {
  3. $GLOBALS['api']['response']['message'] = 'rox in socks!';
  4. $GLOBALS['api']['response']['data'] = 'https://www.roxinsocks.com/';
  5. $response->getBody()->write(jsonE($GLOBALS['api']));
  6. return $response
  7. ->withHeader('Content-Type', 'application/json;charset=UTF-8')
  8. ->withStatus($GLOBALS['responseCode']);
  9. });
  10. $app->redirect('/roxinsocks', 'https://roxinsocks.com', 301);