Sebuahhobi98

webhook

May 3rd, 2020
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. public function receive(){
  2. $this->output->set_content_type('application/json');
  3.  
  4. $phone = $this->input->post('phone');
  5. $name = $this->input->post('pushName');
  6. $message = $this->input->post('message');
  7. $groupId = $this->input->post('groupId');
  8. $groupSubject = $this->input->post('groupSubject');
  9. $image = $this->input->post('image');
  10. $file = $this->input->post('file');
  11. $url = $this->input->post('url');
  12.  
  13. if($message == "/help"){
  14. $pesan = "Sabar, masih dalam proses!
  15.  
  16. \nSebuahhobi
  17. ";
  18. echo $pesan;
  19. } else {
  20. echo null;
  21. }
  22. $data = [
  23. 'phone' => $phone,
  24. 'name' => $name,
  25. 'message' => $message,
  26. 'groupId' => $groupId,
  27. 'groupSubject' => $groupSubject,
  28. 'image' => $image,
  29. 'file' => $file,
  30. 'url' => $url
  31. ];
  32.  
  33. $db = $this->ap->insert($data);
  34.  
  35. }
Add Comment
Please, Sign In to add comment