PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

SMS Validation

The SMS Validation service allows the validation of physical phone number to be used as the sender of an SMS.

First, call setValidationKeyword() to receive an SMS with a keyword.

After you get your keyword, you have to use the validate() to validate your number with the keyword against the service.

With the method getValidatedNumbers(), you will get a list of all already validated numbers and the status of each.

Example 806. Request validation keyword

<?php
$service 
= new Zend_Service_DeveloperGarden_SmsValidation($config);
print_r($service->sendValidationKeyword('+49-172-123456'));

Example 807. Validate a number with a keyword

<?php
$service 
= new Zend_Service_DeveloperGarden_SmsValidation($config);
print_r($service->validate('TheKeyWord''+49-172-123456'));

To invalidate a validated number, call the method inValidate().

Zend Framework