A Totoloto (Portuguese Lottery) Results API

Nuno F. C. Guerreiro e0f155215a Atualizar 'README.md' 6 months ago
LICENSE 7b5961af5c Initial commit 6 months ago
README.md e0f155215a Atualizar 'README.md' 6 months ago
totoloto.php 12653be6f4 Atualizar 'totoloto.php' 6 months ago
totoloto.sqlite.sql 32d53211b2 Adicionar 'totoloto.sqlite.sql' 6 months ago

README.md

Totoloto API

A Totoloto (Portuguese Lottery) Results API in php using a sqlite database.

Web Server Rewrite Rules.

Apache.

RewriteRule ^api-totoloto-xml$ /totoloto.php?format=xml
RewriteRule ^api-totoloto-json$ /totoloto.php?format=json
RewriteRule ^api-totoloto$ /totoloto.php?format=txt

Nginx.

rewrite ^/api-totoloto-xml$ /totoloto.php?format=xml;
rewrite ^/api-totoloto-json$ /totoloto.php?format=json;
rewrite ^/api-totoloto$ /totoloto.php?format=txt;

Examples:

Please note that the results in the examples below are not or will be updated.

(Last)

https://nunofcguerreiro.com/api-totoloto

https://nunofcguerreiro.com/api-totoloto-xml

https://nunofcguerreiro.com/api-totoloto-json

(All)

https://nunofcguerreiro.com/api-totoloto?result=all

https://nunofcguerreiro.com/api-totoloto-xml?result=all

https://nunofcguerreiro.com/api-totoloto-json?result=all

(Date)

https://nunofcguerreiro.com/api-totoloto?result=2020-01-08

https://nunofcguerreiro.com/api-totoloto-xml?result=2020-01-08

https://nunofcguerreiro.com/api-totoloto-json?result=2020-01-08

(All Year)

https://nunofcguerreiro.com/api-totoloto?result=2020

https://nunofcguerreiro.com/api-totoloto-xml?result=2020

https://nunofcguerreiro.com/api-totoloto-json?result=2020

(All Year/Month)

https://nunofcguerreiro.com/api-totoloto?result=2020-01

https://nunofcguerreiro.com/api-totoloto-xml?result=2020-01

https://nunofcguerreiro.com/api-totoloto-json?result=2020-01