https://github.com/unix-user/curlsyncmp
https://github.com/unix-user/curlsyncmp
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unix-user/curlsyncmp
- Owner: Unix-User
- Created: 2021-01-19T03:23:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-17T21:57:05.000Z (almost 5 years ago)
- Last Synced: 2025-02-21T11:15:29.242Z (11 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CurlSyncMP
Esse é um exemplo simples de um script que pode ser agendado no crontab para recuperar os dados do site via cUrl.
clone o script e renomeie o arquivo 'config-example.php' para 'config.php'
# cd /var/www/html
# git clone https://github.com/Unix-User/CurlSyncMP.git
# mv /var/www/html/config-example.php /var/www/html/config.php
edite o arquivo 'config.php' com as credenciais do site e do banco de dados do freeradius.
adicione-o em seu crontab, no terminal digite:
# crontab -e
*/10 * * * * /usr/local/bin/php /var/www/html/index.php
no exemplo acima o script sera executado a cada 10 minutos.