Re: Re: what to do to send SMS from a website?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Theres a few options to send SMS from within a php application. It also depends if u wanna send International SMS  or just between an specific area.
 
 For International SMS you could open an account with an SMS aggregator, which sends the SMS to the carriers SMS servers  (clickatell, like it has been mentioned is a good option, with good support). Theres a php class for sending sms with clickatell at phpclasses.org.

For an specific area you could make your own SMS server theres tutorials on how to do it around the web (google it). You could use and Email to SMS gateway if its available from the local carriers.







lusciousuklady <geneva@xxxxxxxxxxxxx> wrote:                               --- In php-objects@xxxxxxxxxxxxxxx, Imran <imransaieen@...> wrote:
 >
 > Dear friends,
 > 
 > There is a need to send and receive SMS from a PHP based website to/from
 > mobile phones. Which PHP software should be used to make it working?
 > 
 > Thanks for your knowledge sharing,
 > Imran
 > 
 > 
 > [Non-text portions of this message have been removed]
 >
 
 You dont need any software in particular, you just need to mail it to
 the right provider.
 
 See Below:
 
 <code>
 
 //Someone is sending an SMS
    if ( $_POST['sms-submit']=='send' ) {
   
 // $options['provider'] contains the whole provider string, split to
 format/server - I use Tmobile UK
    
 $options['provider'] = '0n@xxxxxxxxxxxxxxx';
 
 $provider_data=explode("@",$options['provider']);
   
 
 // replace n in format string with number, stripping initial 0
 (provided in format)
 
 //the $options['mobile'] in your form should be your mobile number
 with the countrycode - ie mine is +44 then without 0
   
 $provider_data[0]=str_replace('n',ltrim($options['mobile'],0),$provider_data[0]);
 
 $to=$provider_data[0] . '@' . $provider_data[1];
 
 $header=$options['header'];
 
 $emailheaders = 'From: geneva@xxxxxxxxxxxxx' . "\r\n" .
 'Reply-To: geneva@xxxxxxxxxxxxx' . "\r\n" .
 'X-mailer: PHP/' . phpversion();
 
 global $userdata;
 get_currentuserinfo();
   
 $subject="Text from theGeneva.com";
 $message= strip_tags(stripslashes($_POST['sms-message']));
 
 //Trim message to max SMS number 
 $message=substr($message,0,$options['maxlength']);  
 
 @mail($to, $subject, $message, $emailheaders);
 
     
 
 </code>
 
 
     
                               

       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux