Php/mysql connect to nowsms gateway | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through September 26, 2009 ⬆ |
◄ ► |
Author | Message | |||
xavier BALTUS New member Username: Kraken972 Post Number: 1 Registered: 07-2009 |
hi all, i have a database managed by a php website. i want to extract some receipient from my database and send the result of my sql request to now sms gateway to send about 300 sms. how can i do that ? how can i connect my website (php/mysql) to do mass sms mailing ? thanks, best regards. | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 1071 Registered: 08-2008 |
Hi Xavier, We've got an example PHP script that you can use which is located at the following link: http://www.nowsms.com/download/sendsms-php.txt And described in more detail here: http://blog.nowsms.com/2008/10/nowsms-php-example-send-sms-text.html To specify multiple recipients for the same SMS message, the easiest way to do this is to use a comma delimited of recipients in the phone number field ... e.g., 12345,67890,11111,22222,3333 -- Des NowSMS Support | |||
xavier BALTUS New member Username: Kraken972 Post Number: 2 Registered: 07-2009 |
thanks a lot, but is there a limit of recipients to submit ? any timeout with the php script du to many many recipient ? about 5000 ? or 10 000 ? no limit ? Best regards, BX | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 1077 Registered: 08-2008 |
Hi BX, We don't impose a limit. Additional memory is dynamically allocated to accommodate lengthy recipient lists. That said, it's generally not a good idea to use an HTTP GET request if you're talking about 5000 to 10000 recipients. It will work with the PHP script above because we're using raw sockets. Still, I'd recommend using HTTP POST instead. There's a modification of that script that uses HTTP POST instead. It is at the following link: http://www.nowsms.com/download/sendsmspost-php.txt Timeouts may be a consideration ... if your web server has extremely low timeouts. On my test system, it takes 7 seconds for the HTTP response to come back with 5,000 recipients, 14 seconds for 10,000 recipients, and 15 seconds for 150,000 recipients. (Above 10,000 recipients, some bulk queue logic kicks in to make sure that the HTTP response doesn't take too long.) -- Des NowSMS Support |