예제 #1
0
파일: search.php 프로젝트: joedixon/nexmo
<?php

/**
 * Include Composer autoloader
 */
require_once __DIR__ . '/../../vendor/autoload.php';
/**
 * Import Sms client
 */
use Nexmo\Sms;
/**
 * Load config, expecting an array with:
 * api_key, api_secret
 */
$config = (include __DIR__ . '/../../config-local.php');
/**
 * Get an SMS client object
 */
$sms = new Sms($config);
/**
 * Now lets search for a message
 */
$results = $sms->searchMessage(['id' => $config['search']['id']]);
/**
 * Dump out results
 */
print_r($results);
예제 #2
0
파일: sms.php 프로젝트: joedixon/nexmo
<?php

/**
 * Include Composer autoloader
 */
require_once __DIR__ . '/../../vendor/autoload.php';
/**
 * Import Sms client
 */
use Nexmo\Sms;
/**
 * Load config, expecting an array with:
 * api_key, api_secret, to, from, text
 */
$config = (include __DIR__ . '/../../config-local.php');
/**
 * Get an SMS client object
 */
$sms = new Sms($config);
/**
 * Now lets send a message
 */
$results = $sms->send(['from' => $config['from'], 'to' => $config['to'], 'text' => $config['text']]);
/**
 * Dump out results
 */
print_r($results);
예제 #3
0
 public function sendLink($number, $callid)
 {
     $this->sms->send(['to' => $number, 'from' => $this->from, 'text' => 'Get your photos here: ' . $this->web . '/' . $callid . '.html']);
 }