| Conditions | 1 |
| Paths | 1 |
| Total Lines | 33 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function sendSmsRequest(string $url,Array $data,$authorization) |
||
|
|
|||
| 14 | { |
||
| 15 | |||
| 16 | |||
| 17 | $datacontent=$data["content"]; |
||
| 18 | $datato=$data["to"]; |
||
| 19 | $curl = curl_init(); |
||
| 20 | |||
| 21 | curl_setopt_array($curl, array( |
||
| 22 | CURLOPT_URL => "https://api.telerivet.com/v1/projects/PJe7f3e7fe7d0ddf20/messages/send", |
||
| 23 | CURLOPT_RETURNTRANSFER => true, |
||
| 24 | CURLOPT_ENCODING => "", |
||
| 25 | CURLOPT_MAXREDIRS => 10, |
||
| 26 | CURLOPT_TIMEOUT => 30, |
||
| 27 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, |
||
| 28 | CURLOPT_CUSTOMREQUEST => "POST", |
||
| 29 | CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n$datacontent\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"to_number\"\r\n\r\n$datato\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--", |
||
| 30 | CURLOPT_HTTPHEADER => array( |
||
| 31 | "authorization: Basic ".$authorization, |
||
| 32 | "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" |
||
| 33 | ), |
||
| 34 | )); |
||
| 35 | |||
| 36 | |||
| 37 | $response = curl_exec($curl); |
||
| 38 | $err = curl_error($curl); |
||
| 39 | |||
| 40 | curl_close($curl); |
||
| 41 | |||
| 42 | |||
| 43 | return $response; |
||
| 44 | |||
| 45 | } |
||
| 46 | |||
| 48 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.