execute mail function automatically on specified time, php-jquery
I've a page with php script to list viewers info like browser,time they were viewing etc and save those details into a inf开发者_StackOverflow中文版o.txt file which is stored in the server. I'd prefer to collect all the details from info.txt and mail me every day at specified time. I hope there should be a better way to do it with php-jquery.Thanks
If your server is a Linux server, it would be pretty easy to set up a cron job to send that file to you via email at a specified time daily/weekly/monthly.
You could either write a PHP script that can be called in the cron job, or you can also just create a cron job that uses a cli mail client.
PHP and jquery is the wrong tool for that - you would need a cron job or something on your webserver that does the work periodically.
Why don't you just RSS instead? you don't fill your mailbox with information outdated the next day, and your rss-feed is always up-to-date. Most browsers or email programs already have an RSS reader build in, and you can also set them to poll the feed either daily or on demand.
精彩评论