Advertisement
Guest User

Untitled

a guest
Apr 10th, 2020
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1.             $ch = curl_init();
  2.             curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:31001/player/eventalert");
  3.             curl_setopt($ch, CURLOPT_POST, 1);
  4.             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  5.        
  6.             $ha = htmlentities($_POST['alerte']);
  7.             $ha = preg_replace("/\r\n|\r|\n/",'<br/>',$ha);
  8.             $userid = $user->get('id');
  9.             $message = "test";
  10.             $header = "";
  11.             $canfollow = "true";
  12.  
  13.             curl_setopt($ch, CURLOPT_HTTPHEADER, ['authToken: f2dV965CL1fm0qgaXXrAT34yhvshcI8u','senderId:' . $userid, 'message: ' . $message, 'header: '.$header, 'canFollow: '.$canfollow ]);
  14.             $server_output = curl_exec($ch);                                  
  15.             curl_close ($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement