https://github.com/vaneves/lottery
🍀 Resultado das Principais Loterias do Brasil
https://github.com/vaneves/lottery
lottery megasena php
Last synced: 3 months ago
JSON representation
🍀 Resultado das Principais Loterias do Brasil
- Host: GitHub
- URL: https://github.com/vaneves/lottery
- Owner: vaneves
- License: unlicense
- Created: 2016-02-24T15:40:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T21:46:53.000Z (about 8 years ago)
- Last Synced: 2025-04-05T15:02:57.326Z (3 months ago)
- Topics: lottery, megasena, php
- Language: PHP
- Homepage:
- Size: 47.9 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lottery
## Installing
Via Composer
```
composer require vaneves/lottery
```
## Cron Jobs```
0 2 * * * wget -q -O tmp/megasena.html http://loterias.caixa.gov.br/wps/portal/loterias/landing/megasena/
0 2 * * * wget -q -O tmp/quina.html http://loterias.caixa.gov.br/wps/portal/loterias/landing/quina/
0 2 * * * wget -q -O tmp/lotofacil.html http://loterias.caixa.gov.br/wps/portal/loterias/landing/lotofacil/
0 2 * * * wget -q -O tmp/lotomania.html http://loterias.caixa.gov.br/wps/portal/loterias/landing/lotomania/
0 2 * * * wget -q -O tmp/timemania.html http://loterias.caixa.gov.br/wps/portal/loterias/landing/timemania/
0 2 * * * wget -q -O tmp/duplasena.html http://loterias.caixa.gov.br/wps/portal/loterias/landing/duplasena/
```## Usage
``` php
use Vaneves\Lottery\Lottery;
use Vaneves\Lottery\MegaSena;$lottery = new MegaSena();
$lottery->load('html/megasena.html');$result = new \stdClass;
$result->number = $lottery->getNumber();
$result->date = $lottery->getDate();
$result->result = $lottery->listResults();
$result->awards = $lottery->listAwards();
$result->next = $lottery->getNext();```