Answers for "txt local sms integration in php example"

PHP
0

txt local sms integration in php example

<?php
	require('textlocal.class.php');
	$otp = rand(1000,9999);
	$textlocal = new Textlocal(false, false,
	'XXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
	$phone = '910123456789'; // ISD code prepended
	$numbers = array($phone);
	$sender = 'TXTLCL';
	$message = 'OTP: '.$otp;

	try {
		$result = $textlocal->sendSms($numbers, $message, $sender);
	} catch (Exception $e) {
		$err['error'] = $e->getMessage();
	}
?>
Posted by: Guest on November-15-2020

Browse Popular Code Answers by Language