Reputation: 75
I am working on a site that allows users to enter their phone number and carrier, and choose a time to receive a daily alert via SMS.
I am inserting information (phone number, carrier, and time) into an SQL database, then using php's mail()
function to send SMS texts to their phone by email (i.e. if a Verizon user's number is 123456789
, I would send an SMS by emailing to [email protected]
).
I cannot figure out how to send the SMS every day repeatedly, as well as how to send it at the specific time the user selects. What approach could I take to do this?
Upvotes: 1
Views: 1722
Reputation: 5091
You need to use some scheduler application like "cron" in Unix machines or "Scheduled Tasks" in Windows machines. Use one of those apps to schedule a job for execute a php file at the time and day pattern you want.
Upvotes: 5
Reputation: 13212
You either have to have an SMS Gateway (hardware) or use some other service to do so.
For example: http://www.sms4pc.com/api-start?gclid=CKei9Yr_7qwCFRLatgodGyNJKQ
Upvotes: -1