hi i have a project that will send sms to its subscriber but ive look everywhere and could no get a good answer.

my project will be in php and im just wondering is there a software that i can install on a pc and hook a gms modem with it to send the sms and connect my php application with it .

so the php app will process everything and finally connect with the software on my pc provide the number and message to send it just like ozekisms but one that can send at lease 10 sms per second and is open source not so costly like ozekisms.

thanks hope someone could help me out oh and the software must have ability to connect with an api from my php app

Recommended Answers

All 5 Replies

Hi eltonpiko,
If you are doing it in PHP, I suggest you just do it via email. You can email cell phones really simply. Its usally like

5552962@vmob.com (virgin mobile, thats not the real one)

So just store the numbers in a database with id/name and then echo it into that. Then email them anything you need and it goes to their phone.

thanks for the reply.yes i will be doing it in php. but does all country and carrier support this option?and how would i be charge for the sms dont i need a gateway or something is the way you suggesting a free service?

So you want to have them pay via sms? is that what your asking? If so, there are some options out there already. But they have a fee.

Also, the companys that are already out there, they are HUGE giant coperations that have contracts with the mobile companys. Thats why some don't support certain phone companys. You would need to get in contact with each phone company to setup sms payment.

hi thanks for the replay i wanted to use carrier available in my country with the use of a gsm modem and software like nowsms so that my website can send the query or command to the software to send the sms but the only prob with the nowsms they provide and api that you intergrate in you app it look like this

<?php

function SendSMS ($host, $port, $username, $password, $phoneNoRecip, $msgText) { 

/* Parameters:
    $host – IP address or host name of the NowSMS server
    $port – “Port number for the web interface” of the NowSMS Server
    $username – <span class="notranslate">“SMS Users”</span> account on the NowSMS server
    $password – Password defined for the <span class="notranslate">“SMS Users”</span> account on the NowSMS Server
    $phoneNoRecip – One or more phone numbers (comma delimited) to receive the text message
    $msgText – Text of the message
*/
 
    $fp = fsockopen($host, $port, $errno, $errstr);
    if (!$fp) {
        echo “errno: $errno \n”;
        echo “errstr: $errstr\n”;
        return $result;
    }
    
    fwrite($fp, “GET /?Phone=” . rawurlencode($phoneNoRecip) . “&Text=” . rawurlencode($msgText) . ” HTTP/1.0\n”);
    if ($username != “”) {
       $auth = $username . “:” . $password;
       $auth = base64_encode($auth);
       fwrite($fp, “Authorization: Basic ” . $auth . “\n”);
    }
    fwrite($fp, “\n”);
  
    $res = “”;
 
    while(!feof($fp)) {
        $res .= fread($fp,1);
    }
    fclose($fp);
    
 
    return $res;
}


/* This code provides an example of how you would call the SendSMS function from within
   a PHP script to send a message.  The response from the NowSMS server is echoed back from the script.
 
$x   = SendSMS(“127.0.0.1″, 8800, “username”, “password”, “+44999999999″, “Test Message”);
echo $x;

*/

/* This code provides an example of sending a message via NowSMS as the result of a web form posting.

   First, here’s a very simple HTML web form that provides an example of what you need in your
   web form.

<HTML> 
<HEAD><TITLE>Send SMS</TITLE></HEAD> 
<BODY> 
<form method=”post” action=”sendsmsscript.php”> 
<table border=”1″> 
<tr> 
<td>Mobile Number:</td> 
<td><input type=”text” name=”phone” size=”40″></td> 
</tr> 
<tr> 
<td valign=”top”>Text Message:</td> 
<td><textarea name=”text” cols=”80″ rows=”10″></textarea> 
</tr> 
<tr> 
<td colspan=”2″ align=”center”> 
<input type=”submit” value=”Send”> 
</td> 
</tr> 
</table> 
</form> 
</BODY> 
</HTML> 

   Second, here’s the PHP script that would parse the parameters from the form posting, and then call
   the SendSMS function to submit the message.

if (isset($_REQUEST['phone'])) { 
   if (isset($_REQUEST['text'])) { 
      $x = SendSMS(“127.0.0.1″, 8800, “username”, “password”, $_REQUEST['phone'], $_REQUEST['text']); 
      echo $x; 
   } 
   else { 
      echo “ERROR : Message not sent — Text parameter is missing!\r\n”; 
   } 
} 
else { 
   echo “ERROR : Message not sent — Phone parameter is missing!\r\n”; 
} 

*/
 
?>

but instead of of using form to provide phone number or messages i would like to get a query to my database to provide both the number and messages.is this api extendable i think it should be right.

one more thing like if i get an unlimited sms plan from a carrier normally is there any limit of how much sms you can send at the same time. for im thinking minimum 5,000 would it be consider as spamming? but these people that will be receiving those msg will have subscribe to this service not just sending to any number.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.