LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-21-2007, 12:04 PM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
Anyone able to send SMS from web to mobiles with Script ?


SMS to handys?

Be good, be linux !
 
Old 06-21-2007, 12:23 PM   #2
LightningCrash
LQ Newbie
 
Registered: Jun 2007
Posts: 23

Rep: Reputation: 15
i used to send messages to my cell phone via e-mail, but that was a long time ago and only for my cell phone.

an SMS script, though, i've not heard of

others here may know
 
Old 06-22-2007, 02:13 AM   #3
Txtlocal
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Rep: Reputation: 0
Hi,

There is a free script at http://www.txtlocal.com/sms-api.php - simply sign up for a free account and you can play with 10 messages. If it works for you then you can buy more in bundles from 100 to 1 million!

Code:
<?php
//set up variables
$info = "1";
$address = "www.txtlocal.com/sendsmspost.php";
$message = "Hello this is a test with an ampersand (&) and a £5 note";
$message = urlencode($message); //encode special characters (e.g. £,& etc)
$from = "Jims Autos";
$uname = "youremailaddress";
$pword = "yourpassword";
$selectednums = "447740101098";

//build url
$data = "uname=" . $uname . "&pword=" . $pword . "&message=" . $message . "&from=" . $from . "&selectednums=" . $selectednums . "&info=" . $info;

//send messages
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://$address");
//curl_setopt($ch, CURLOPT_URL,"https://$address"); //secure connection
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //use this to suppress output
$result = curl_exec ($ch);
curl_close ($ch);
?>
If in the USA you may HAVE to set the FROM element to a short code. (short mobile number)

If you have any questions please get in touch.

Many thanks,

Alastair
CTO
http://www.txtlocal.com
 
Old 06-22-2007, 02:14 AM   #4
Txtlocal
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Rep: Reputation: 0
.. oh, and $selectednums can be comma separated from 1 to 10k numbers.

A.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with minicom send SMS message script nickleus Linux - Wireless Networking 3 06-25-2009 05:47 AM
Send SMS via PHP? Swift&Smart Linux - Software 3 04-20-2008 06:45 PM
Software to send SMS from command line jantman Linux - Software 2 03-06-2007 04:41 PM
How to send sms to CDMA using smpp? ambuj Programming 0 05-15-2004 02:09 AM
How to send SMS via web? Smooth General 4 06-24-2003 10:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration