| View previous topic :: View next topic |
| Author |
Message |
Zoltar VDS Pirate


Joined: 26 Dec 2001 Posts: 91
|
Posted: Sat Dec 29, 2001 4:18 pm Post subject: Sending SMS with vds |
|
|
Is it possible to send sms with a vds application
or a vds extension?
Thanks
 _________________
Zoltar
http://membres.lycos.fr/ |
|
| Back to top |
|
 |
Henrik Valued Newbie

Joined: 09 Jul 2000 Posts: 35 Location: Copenhagen, Denmark
|
Posted: Sat Dec 29, 2001 6:08 pm Post subject: Sending SMS with vds |
|
|
| Zoltar wrote: |
Is it possible to send sms with a vds application
or a vds extension?
Thanks
|
Yes !
You need to know what company the subscriber uses. The code beneath is PHP code usable only for Danish SMS / cellular subscribers but it can easily be rewritten in VDS. The variable $nummer is the phonenumber
//Definer modtager
if ($nummer < 20599999) { $nummer = "$nummer@sms.tdm.dk"; }
elseif ($nummer < 20999999) { $nummer = "$nummer@note.sonofon.dk"; }
elseif ($nummer < 21999999) { $nummer = "$nummer@sms.tdm.dk"; }
elseif ($nummer < 22999999) { $nummer = "$nummer@note.sonofon.dk"; }
elseif ($nummer < 23999999) { $nummer = "$nummer@sms.tdm.dk"; }
elseif ($nummer < 26999999) { $nummer = "$nummer@sms.mobilix.dk"; }
elseif ($nummer < 28999999) { $nummer = "$nummer@gsm1800.telia.dk"; }
elseif ($nummer < 30749999) { $nummer = "$nummer@sms.tdm.dk"; }
elseif ($nummer < 40499999) { $nummer = "$nummer@sms.tdm.dk"; }
elseif ($nummer < 40999999) { $nummer = "$nummer@note.sonofon.dk"; }
elseif ($nummer < 66899999) { $nummer = "$nummer@sms.tdm.dk"; }
And then you need to built the string to send as SMS: ($besked2)
$besked2 = "$besked"."$adtext";
And finally send it as an email, setting the recipient to $number and the body to the the contents of $besked2. You can use your extension of choice for this. The from field in the email header should be the contents of the $sender variable (could be digits or a "real" string:
//PHP code
mail($nummer, "",$besked2, "FROM:$sender:");
That's all there is to it.
However, I have heard that several Danish phone companies (and surely others too) plan on charging for using their SMS servers to send SMS's like email, so be sure to check this.
Let me know if you have problems
Henrik _________________ Henrik Skov
Email: henrikskov@mail.dk |
|
| Back to top |
|
 |
Zoltar VDS Pirate


Joined: 26 Dec 2001 Posts: 91
|
Posted: Sat Dec 29, 2001 7:21 pm Post subject: [i]ok[/i] |
|
|
yeah
it's like sending an email
theTelNumber@TheOperator
thanks
But I'm not danish.
PS : your picture is 8O [/quote] _________________
Zoltar
http://membres.lycos.fr/ |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Dec 29, 2001 10:19 pm Post subject: |
|
|
Henrik,
Could I possibly talk you into selecting a different avatar? The one you're using at the moment is not quite appropriate. It does not personally offend me, but you have to realize, that there are young ones who use this forum also, and their parents may be quite offended by that. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
Henrik Valued Newbie

Joined: 09 Jul 2000 Posts: 35 Location: Copenhagen, Denmark
|
Posted: Sun Dec 30, 2001 4:28 am Post subject: |
|
|
Garrett, I have now changed my avatar. I just chose the first of a series of avatars I have lying around, not wondering much about the look of it, but I hope you like the new one better
And to Zoltar: Well, I am aware of the ranges used in the example is usable for Danes only, but I have no idea where to get them. I got mine by talking to a friend a the largest phone company here in Denmark. But maybe the FCC (is this what it's called ??) or the companies' business association ?? Can't help you there !
Oops ! I just recall a program called SMS Gateway (which I had installed once) and I think it has the Company names of every phone company and their servers in its datafiles somewhere.
Hope this help a little !
Henrik _________________ Henrik Skov
Email: henrikskov@mail.dk |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Dec 30, 2001 7:55 am Post subject: |
|
|
Hey, if you're going to put controversial avatars here, at least put up some really hot looking Danish babe would ya!
Well, as far as I can see, that avatar is ok.. But just what is that sticking up on the left side of it??
Thanks, _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|