Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function sms($telepon = '', $message = ''){
- $this->output->set_content_type('application/json');
- $userkey = "3ifvmw";
- $passkey = "85evefuhgm";
- $url = "https://reguler.zenziva.net/apps/smsapi.php";
- $curlHandle = curl_init();
- curl_setopt($curlHandle, CURLOPT_URL, $url);
- curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&pesan='.$message);
- curl_setopt($curlHandle, CURLOPT_HEADER, 0);
- curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
- curl_setopt($curlHandle, CURLOPT_POST, 1);
- $results = curl_exec($curlHandle);
- curl_close($curlHandle);
- $XMLdata = new SimpleXMLElement($results);
- $status = $XMLdata->message[0]->text;
- //echo json_encode($XMLdata);
- return $XMLdata;
- }
- $this->data['pesan'] = "Cacing%20dalam%20bahaya!%0A
- pH = ".$ph."
- ".$this->data['signature'];
- $this->data['sendSMS'] = $this->sms('08xx', $this->data['pesan']);
Add Comment
Please, Sign In to add comment