possible to make text messaging with php have a constant "telephone number" value?
i have an iphone 3g and can successfully send text messages using the PHP mail() function. My issue is that for each message i receive, the "telephone number" associated with the incoming text message changes each time. If possible, I would like to somehow 开发者_开发问答make this number constant so that I can take advantage of iphone's ability to aggregate all text messages from the same telephone number -Otherwise my iphone would be cluttered with messages. Is there a way to do this?
an example of the numbers I receive would be 1(410) 000-001, 1(410) 000-002, 1(410) 000-003, etc... can i make this constant somehow?
$message = stripslashes("new user just joined!");
mail("8185551111@txt.att.net", "Subject", "$message");
please let me know! thanks...
This is likely more to do with ATT than your PHP code.
This is a limitation of the carrier's email-to-SMS gateway. There's no way to guarantee which number the message will come from.
SHAMELESS PROMO: You could use a service like Twilio (whom I work for) and get a phone number for $1/month which you would be able to always send from. There's a ton of PHP sample code to get you started. There are other SMS APIs out there as well so look around and find the one that you like best.
精彩评论