How to handle more than 1 SMS Command Prefix ?

How to handle more than 1 SMS Command Prefix ? SearchSearch
Author Message
Buzzsms
New member
Username: Buzzsms

Post Number: 3
Registered: 09-2006
Posted on Tuesday, October 03, 2006 - 07:54 am:   

Hi all,

Please show me how to handle more than one SMS Command Prefix. Example:

User A send a sms to SMSC with content:
"BUY CAR ford escape"

User B send a sms to SMSC with content:
"SELL PC Intel Pentium 4"

I need to insert their sms to 2 database BUY/CAR and SELL/PC. I config NowSMS 2-Way with prefix "BUY" and "SELL" but it only insert to 2 databse BUY and SELL not to BUY/CAR and SELL/PC.

Can anyone give me PHP source code to do this ? Thank you so much.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6620
Registered: 10-2002
Posted on Tuesday, October 03, 2006 - 09:12 pm:   

I'm not a super expert in PHP (so I don't have a ready made example for you), but I would think that you could use the strtok function to easily parse out the individual words.
Buzzsms
New member
Username: Buzzsms

Post Number: 4
Registered: 09-2006
Posted on Wednesday, October 04, 2006 - 05:14 am:   

Thank for your help, Bryce.