在liunx服务器上用ajax从接口接收数据又存入本地服务器

WBOY
Release: 2016-06-13 12:18:05
Original
898 people have browsed it

在liunx服务器上用ajax从接口接收数据再存入本地服务器
如题
接数据,存数据容易,打开个浏览器设置自动刷新就可以了,
但要如何让linux服务器开机自动定时执行呢?
------解决思路----------------------
用crontab去执行curl
------解决思路----------------------
用crontab执行php是可以的,只是要存入本地服务器就不行了。
------解决思路----------------------
crontab中定时执行php
php 使用curl获取接口数据写入db就可以了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!