Last active
February 1, 2016 08:44
-
-
Save SendOTP/340e819fa07713d08839 to your computer and use it in GitHub Desktop.
SendOTP : Check mobile number status : PHP sample code to verify request on server side in basic architecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SendOTPBasic { | |
private $baseUrl = "http://sendotp.msg91.com/api"; | |
public function checkNumberStatus($request) { | |
$ch = curl_init($this->baseUrl+'/checkNumberStatus?refreshToken={REFRESH TOKEN}&countryCode={91}&mobileNumber={98XXXXX}'); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_AUTOREFERER, true); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( | |
'Content-Type: application/json', | |
'application-key : Your-application-key' | |
)); | |
$result = curl_exec($ch); | |
curl_close($ch); | |
return $result; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment