phpmady Posted February 20, 2011 Share Posted February 20, 2011 Hi, I have a project where i want to send the sms to the customers at the particular time calling from the database, how to do these in php? Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/228266-sending-sms-automatically-based-on-the-time-from-the-database/ Share on other sites More sharing options...
Fergal Andrews Posted February 20, 2011 Share Posted February 20, 2011 Hi phpmady, You can trigger a PHP script using a cronjob on your server. The script extracts the required data from the database, formats it and sends an HTTP request to an SMS gateway. For the actual sending of an sms from php, have a look at this tutorial: http://www.sephiroth.it/tutorials/flashPHP/sms/ To trigger Cheers, Fergal Quote Link to comment https://forums.phpfreaks.com/topic/228266-sending-sms-automatically-based-on-the-time-from-the-database/#findComment-1177088 Share on other sites More sharing options...
phpmady Posted February 20, 2011 Author Share Posted February 20, 2011 Hi phpmady, You can trigger a PHP script using a cronjob on your server. The script extracts the required data from the database, formats it and sends an HTTP request to an SMS gateway. For the actual sending of an sms from php, have a look at this tutorial: http://www.sephiroth.it/tutorials/flashPHP/sms/ To trigger Cheers, Fergal Thanks Fergal , How can i test the cronjob in my local server xampp, Quote Link to comment https://forums.phpfreaks.com/topic/228266-sending-sms-automatically-based-on-the-time-from-the-database/#findComment-1177091 Share on other sites More sharing options...
Fergal Andrews Posted February 20, 2011 Share Posted February 20, 2011 Hi phpmady, If you are on a windows machine you can set up a scheduled task and run the PHP script using wget for windows. http://gnuwin32.sourceforge.net/packages/wget.htm. This calls the script using an http request. http://en.wikipedia.org/wiki/Wget Cheers, Fergal Quote Link to comment https://forums.phpfreaks.com/topic/228266-sending-sms-automatically-based-on-the-time-from-the-database/#findComment-1177092 Share on other sites More sharing options...
Fergal Andrews Posted February 20, 2011 Share Posted February 20, 2011 sorry, should have said, if you have set up php to run from the command line in windows you probably don't need to use wget. Quote Link to comment https://forums.phpfreaks.com/topic/228266-sending-sms-automatically-based-on-the-time-from-the-database/#findComment-1177093 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.