PHP code example of ip1sms / ip1-php-sdk

1. Go to this page and download the library: Download ip1sms/ip1-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ip1sms / ip1-php-sdk example snippets



use IP1\RESTClient\SMS\OutGoingSMS;
use IP1\RESTClient\Core\Communicator;

$com = new Communicator("{account-id}", "{apiKey}");
$sms = new OutGoingSMS("{nameOrNumber}", "IP1 SMS is the best!");
$sms->addNumber("{aPhoneNumber}");
$com->add($sms);


use IP1\RESTClient\Recipient\Contact;
use IP1\RESTClient\Recipient\ProcessedContact;
use IP1\RESTClient\Core\Communicator;

$com = new Communicator("{accountID}", "{apiKey}");
$contact = new Contact("Jack", "{aPhoneNumber}");
$contact = $com->add($contact);

$contact->setEmail("[email protected]");
$com->edit($contact);
json
{
  "sms/ip1-php-sdk": "*"
  }
}