项目作者: Chronolabs-Cooperative

项目描述 :
Toxicology Screening Selection (Rest API) 2.1.2
高级语言: PHP
项目地址: git://github.com/Chronolabs-Cooperative/Screening-API-PHP.git
创建时间: 2016-06-02T12:40:43Z
项目社区:https://github.com/Chronolabs-Cooperative/Screening-API-PHP

开源协议:GNU General Public License v3.0

下载


Chronolabs Cooperative presents

Toxicology Screening REST API ~ http://screening.snails.email

Author: Simon Antony Roberts simon@snails.email

This REST API is for generating a toxicology selection randomly or on occassion co-ordinating via email toxicology screening like narcotic drugs for safety workers and heavy machine operators!

Mod Rewrite Short URL

You will need to have this in API_ROOT_PATH/.htaccess

  1. #Forces SSL
  2. #RewriteEngine On
  3. #RewriteCond %{SERVER_PORT} !^443$
  4. #RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L=301]
  5. RewriteEngine On
  6. RewriteCond %{REQUEST_FILENAME} !-f
  7. RewriteCond %{REQUEST_FILENAME} !-d
  8. RewriteRule ^v1/([0-9]+)/([-+]?[0-9]*\.?[0-9]+)/([a-z]+).api?(.*?) ./index.php?selected=$1&seed=$2&output=$3&4 [L,NC,QSA]
  9. RewriteRule ^v1/([0-9]+)/([-+]?[0-9]*\.?[0-9]+)/([a-z]+).api ./index.php?selected=$1&seed=$2&output=$3 [L,NC,QSA]
  10. RewriteRule ^v1/([0-9]+)/([a-z]+).api?(.*?) ./index.php?selected=$1&output=$2&$3 [L,NC,QSA]
  11. RewriteRule ^v1/([0-9]+)/([a-z]+).api ./index.php?selected=$1&output=$2 [L,NC,QSA]
  12. RewriteEngine On
  13. RewriteCond %{REQUEST_FILENAME} !-f
  14. RewriteCond %{REQUEST_FILENAME} !-d
  15. RewriteRule ^v([0-9]+)/(.*?)/(form).api ./form.php?version=$1&hash=$2&output=$3 [L,NC,QSA]
  16. RewriteRule ^v([0-9]+)/(.*?)/(callback).api ./callback.php?version=$1&hash=$2&output=$3 [L,NC,QSA]
  17. RewriteRule ^v([0-9]+)/(.*?).png ./1x1.php?version=$1&hash=$2&output=1x1 [L,NC,QSA]
  18. RewriteRule ^v([0-9]+)/([0-9]+)/([-+]?[0-9]*\.?[0-9]+)/([a-z]+).api?(.*?) ./index.php?version=$1&selected=$2&seed=$3&output=$4&$5 [L,NC,QSA]
  19. RewriteRule ^v([0-9]+)/([0-9]+)/([-+]?[0-9]*\.?[0-9]+)/([a-z]+).api ./index.php?version=$1&selected=$2&seed=$3&output=$4 [L,NC,QSA]
  20. RewriteRule ^v([0-9]+)/([0-9]+)/([a-z]+).api?(.*?) ./index.php?version=$1&selected=$2&output=$3&$4 [L,NC,QSA]
  21. RewriteRule ^v([0-9]+)/([0-9]+)/([a-z]+).api ./index.php?version=$1&selected=$2&output=$3 [L,NC,QSA]

Enabling module rewrite with apache on ubuntu

Execute the following to enable .htacess and module URL rewritting

  1. $ sudo a2enmod rewrite
  2. $ sudo service apache2 restart

Installation

Copy the PHP file to your hosting spot, then run the install with your browser!