Created
April 22, 2020 12:01
-
-
Save DavidInnocent/82c14e722d7e8288f94ef4c1cbfb21bc to your computer and use it in GitHub Desktop.
This file contains 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 | |
$headers = array( | |
'Content-Type: application/json', | |
'Accept: application/json', | |
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNzk3NDczNmI2NDRkMGRlZGJhMDdhMzVhNTA0MWMyY2I1ZTNhODU4YWJjZDk3MTQxMmYzNzZmMmZhOTgwMjNiZDBmMjYwMmQ4YjlhMWI3OWYiLCJpYXQiOjE1ODY5NDk1NjUsIm5iZiI6MTU4Njk0OTU2NSwiZXhwIjoxNjE4NDg1NTY1LCJzdWIiOiI0NiIsInNjb3BlcyI6W119.tbkq9tDxhVil3lJ1KuamujsEArfLssgnv020zqi7Nz7lGYpfk-pNm8EQ3FccPtFGxEx45Gvzn6G91Oo_8xHpGTeJ33QRWAsaywd2sB-x7FLnARLg3ij98VvGKMDXOoCNDysK8OZJzRFsgnY_9nCR2zNBonsLHZqfl8VnrUg6jkp0uuTj-zIAcEQkmNlCwOrtXc8XnizrmFcLwZa-y4ykTeF-hYUPkhPGpj_FSu4UwnLYWQ1_ah8WY22s125S--M2LdRui-LVfsbUTYpOGw7lxa59Zb2dFUZKwY75LsCkx7KrO-OzjHeHNq8fHgrqxGm0BgfvxCrdzE9ja0J26nj9eb0QaJakj-kFX43-yxi4lfVoX_vBImO-xeZPCDabQHSStjF9OaEMvfroadInr3zHslmia_zI8tqdRXd-gMbPmohof0Ky4r4wSNWAuryGVcSCueiAHuPhM8oTCYwXSJct64XebqloIFUQg52P0PmnRVdB9sqOKwRpl32Tq8HP_X76EqoKkt2JbVpljbXy1bLQqeQV79lbnF7cHfHNJUna96AgaLVYl3ll7xQT9XYDp0IAmJ1hBKBP0Y5mL-tt-rXCZGOfNsdzHV3NM8vrQOeFv4x69E9kddsHh22afnWZUjzh8Dky6OrMECBCUG294WaifFYFyrt7nUoZ0kUCwkwsvZs' | |
); | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, 'https://bulk.bongatech.co.ke/api/v1/send-sms'); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); | |
$curl_post_data = array([ | |
//Fill in the request parameters with valid values | |
'sender' => 'BizAd', | |
'message' => 'PHP sms done. Test11', | |
'phone' => '0703127101', | |
'correlator' => 1 | |
] | |
); | |
$data_string = json_encode($curl_post_data); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_POST, true); | |
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string); | |
$curl_response = curl_exec($curl); | |
echo $curl_response; | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment