txt local sms integration in php example

Solutions on MaxInterview for txt local sms integration in php example by the best coders in the world

showing results for - "txt local sms integration in php example"
Roman
09 Sep 2019
1<?php
2	require('textlocal.class.php');
3	$otp = rand(1000,9999);
4	$textlocal = new Textlocal(false, false,
5	'XXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
6	$phone = '910123456789'; // ISD code prepended
7	$numbers = array($phone);
8	$sender = 'TXTLCL';
9	$message = 'OTP: '.$otp;
10
11	try {
12		$result = $textlocal->sendSms($numbers, $message, $sender);
13	} catch (Exception $e) {
14		$err['error'] = $e->getMessage();
15	}
16?>