PHP code example of smsup / smsup-api-bundle

1. Go to this page and download the library: Download smsup/smsup-api-bundle 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/ */

    

smsup / smsup-api-bundle example snippets

 php
new smsup\SmsupapiBundle\SmsupapiBundle(),
 php
$sender = $this->get('smsup.smsupapi.sender');
$sms = $sender->getNewSms()
				->setTexto('Texto del sms')
				->setNumeros(['000000000']);
$resul = $sender->enviarSms($sms);
if($resul->getHttpcode()===200){
	$idenvio = $resul->getResult()[0]['id'];
}
 php
$sender = $this->get('smsup.smsupapi.sender');
$sender->eliminarSms($idsms);
 php
$sender = $this->get('smsup.smsupapi.sender');
$sender->estadoSms($idsms);
 php
$sender = $this->get('smsup.smsupapi.sender');
$sender->creditosDisponibles();
 php
$sender = $this->get('smsup.smsupapi.sender');
$sender->resultadoPeticion($referencia);