Sending text messages via php

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Yeah, what d11 is trying to say is that texting is done via SMS (Short Message Service), but if you want to send an email to a phone in the UK, you need to connect to WAP/GPRS to receive it (as an MMS - Multimedia Message Service), which costs the receiver money. What Roja is saying (I think?) is that in the US emails sent to phones are automatically transferred to SMS and received as SMS, which is free for both parties. In the UK, operators don't support that.

I never knew that was done for free in the US, I found a UK company that does it, but you have to sign up to get the quote... http://www.sms2email.com/site/about_ext ... il2sms.php.

I'm suprised how much websites charge for sending SMS to phones via the web. A 100 text package works out at 8.5p a text, I can do that at almost the same price from my phone :?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

http://en.wikipedia.org/wiki/Multimedia ... #Operation
Wikipedia wrote: The MMS data flow starts with a subscriber using an MMS client on the mobile phone to compose, address, and send an MMS message to one or more recipients. MMS addresses can be either E.164 phone numbers (e.g., "+18005551212") or RFC 2822 e-mail addresses (e.g., "you@yourdomain.com").
Everything's branching all kinds of ways. We do voice calls, SMS, MMS, Fax (over mobile), EMS, Video Calls, Video Text and WAP... help :P Too much technology. I stopped bothering with all the new stuff ages ago.. My phone does all of those things I just mentioned but I only do voice calls and SMS.

//Sips beer, offers Roja a beer, sits back in chair :D
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

jayshields wrote:Yeah, what d11 is trying to say is that texting is done via SMS (Short Message Service), but if you want to send an email to a phone in the UK, you need to connect to WAP/GPRS to receive it (as an MMS - Multimedia Message Service), which costs the receiver money. What Roja is saying (I think?) is that in the US emails sent to phones are automatically transferred to SMS and received as SMS, which is free for both parties. In the UK, operators don't support that.
I think you've got it right. Thanks.. definitely helped clear things up. Bummer for the UK! :)
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Yeah, same. Operators only initiated the SMS service originally because of spare, excess bandwidth which was going to be going to waste.

All the other fancy technologies are still too expensive, it shouldn't be 30p to send a picture anymore surely - you could probably get a bus to within 10m of them and bluetooth them it for cheaper, lol.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

All the Canadian providers offer the same service.

Rogers, Telus, Bell, Fido and the other smaller ones do the 10digitnumber@whatever.provider.tld
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

There are very good FF extensions for sending sms messages

https://addons.mozilla.org/quicksearch. ... on=firefox
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

In the UK we have 2 ways to send a text the simple plain version SMS or the fancy lets send a picture or smilies or whatever else on MMS. Most people use SMS for firing of quick text messages or use SMS for sending that picture of their mate making a fool of themselves.

I just finished a project that sends sms text to clients based on some criteria they entered into the site. As site hasn't been published yet I can't mention it yet.

However the client will get billed at a premium rate instead of standard text rate so £1.00 instead of what their provided charges.

The client want through ws.textanywhere.net and is done through using SOAP or XML. Could system if it wasn't for that .aspx extinsion.
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

but anyone knows more services then kapow that gives sms service for all UK networks.. ??

i want to check more prices...
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

uh!

ws.textanywhere.net
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

Cool stuff guys. I made a script for me to be able to send messages to my friends in the USA but I want it so when they 'reply' it sends their text message to my e-mail address. Is this possible? I tried the Reply-to and From headers but they did not seam to work. Incase it matters the main provider I care about is Verizon.

edit: when I send it, it says that the message is from 'nobody@server2.ehostpros.com' which is strange. My host is ehostpros but why is it from that instead of being from my e-mail?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

If you set the from email address it should work. Be sure the header is formatted correctly. Here is a bare bones function I wrote for sending Email. It should work for you.

Code: Select all

function send_mail($from, $to, $subject, $body) {
  $header = "From: " . $from . "\n";
  mail($to, $subject, $body, $header);
}
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

ya i know it *should* work, but it doesn't. My headers are correct, I sent myself a regular e-mail just to make sure I was not going crazy and it was fine. Seriously does not make sence to me.
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

I think that's just something to do with the kind of phone... roomate has t-mobile and he gets some wierd crap like a nobody@something wierd.com .... and the reply number is "502" :P

but sending to myself, with nextel (not paying for the service) it shows exactly:

Name|Message I wrote

http://enhancedworks.com/sendText.php :D
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

phpScott wrote:uh!

ws.textanywhere.net
Directory Listing Denied
This Virtual Directory does not allow contents to be listed.
choppsta
Forum Contributor
Posts: 114
Joined: Thu Jul 03, 2003 11:11 am

Post by choppsta »

I've done a project using http://www.mxtelecom.com before. They have a really simple HTTP interface you can use to do pretty much anything you can think of to do with sending or receiving mobile content.

Can't comment on the pricing as the client already had an account with them and i'm not sure what they pay.

All their technical docs are available on their website too if you're feeling nosey.
Post Reply