Can't schedule CRON jobs


I know how to verify users using emails. But I am stuck in step 2 and 3 .To monitor changes constantly, i can use hash values of the file, but how to find ,what actual changes have been made in the file just like git diff command?
And how can we send send email to each user in every 5 minutes?
PS- I want to implement this using core php and not some external modules.
Any help would be really appreciated. Thanks!

I will assume this is a class project. We do not do homework here. We will help get you started.
The URL GitHub Public Timeline Feed is a JSON feed. You can get it using file_get_contents() function.
JSON feeds are a form of XML which is easy to decode using the json_decode functions.
Each entry has a date and time in it. Study up on JSON and you will know how to get the date/time.
Then, write code to parse thru it.

So, there is a starting point. Good luck on your learning. Once you get some code written, post it here and we can help with problems.

Thanks @ErnieAlex , this helped. Can you give some guidance about periodically email sending as after every 5 minutes , I need to send email. So if there are 1000 users registered, I need to send mail to everyone in every 5 minutes.

Well, is this for school? I do not care if it is, I just if it is for a business or just learning.

For just learning and no fancy email handling, you can just use the mail() function. It does not always work since often you must set up the mail client on the server you are using. But, this link will give you the basic ideas how to code it. Look down to the HTML example as that will be the one you need to make your email look “pretty”… https://www.w3schools.com/php/func_mail_mail.asp
( That site has a ton of general info on it. But, their code is not always the best. )

As for sending it out to a thousand email addresses, you need to loop thru your email list using a foreach… Or a database query. And, send one email at a time. If you CC or BCC a thousand addresses, the server’s would mark it as SPAM. Therefore, you can loop thru the addresses and send one at a time. Sending out 1000 does not take much time really, so not a problem.

Hope this also helps get you started on that part…

Sponsor our Newsletter | Privacy Policy | Terms of Service