// Your variables $key="YOUR-ACCOUNT-KEY"; $phone="PHONE-NUMBER"; $response = httpPost("https://api.textng.xyz/number-info/" ,array("key"=>"$key","phone"=>"$phone"));function httpPost($url, $data){ $curl =curl_init ($url);curl_setopt ($curl, CURLOPT_POST, true);curl_setopt ($curl, CURLOPT_POSTFIELDS, http_build_query($data));curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); curl_close($curl);echo $response; }
Parameters | Example | Description |
---|---|---|
Key |
XXXXX-XXXX-XXXXX | This can be found in the Developers page of your dashboard. The key authorizes the transaction. |
Phone |
XXXXXXXXXX | This is the phone number whose DND status is to be confirmed. |
{'phone': '0701XXXXXXXX', 'status': 'DND ', 'charged': '0.2'}
{'phone': '0701XXXXXXXX', 'status': 'NON-DND ', 'charged': '0.2'}
{'status': 'ERROR - Reason for error'}