skip to Main Content

I want to send a SMS (text message) using php to a mobile. The application would be deployed in localhost. I’m from Romania,Europe. Let me know if any live freeware api to implement this. I can go for paid versions as well.

3

Answers


  1. You can use Twilio, Nexmo etc for sending SMS, even through localhost.
    Some of them provide you with free testing credit but that is only for testing purpose.

    You can use their API,
    see:-https://www.twilio.com/docs/usage/api for more reference.

    Read the docs its simple to implement.

    Login or Signup to reply.
  2. You can use below URL for it:
    https://rapidapi.com/dimashirokov/api/Plivo
    First check with curl example so you get proper response for it.
    Below is code for curl example :

    $api_key = '';
    $from = 'From name';
    $to = '123456789';
    $message = 'Test SMS';  
    $target_url="";
    $post = array('from' => $from,'to'=>$to,"message"=>$message,"api-key"=>$api_key);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$target_url);
    curl_setopt($ch, CURLOPT_POST,1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    $result=curl_exec ($ch);
    curl_close ($ch);
    echo $result;
    

    You need to add appropriate data for above code so you get response.

    Login or Signup to reply.
  3. You can use SMSLink API availabile on https://www.smslink.ro for sending SMS in Romania. You can choose from HTTP(S) GET / POST, SOAP / WSDL or JSON API, or even Mail to SMS.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search