Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2.  
  3. function indexAction(){
  4.  
  5.     $login      = $_GET['login'];
  6.     $password   = $_GET['password'];
  7.     $binding    = $_GET['binding'];
  8.    
  9.     if($binding == null){return print_r('error1440');}
  10.     if($login == null){return print_r('error1440');}
  11.     if($password == null){return print_r('error1440');}
  12.  
  13.     $customHeaders = array(
  14.         'XF-Api-Key: O-LGlgBZn5K4h3cPZNcmuLN1NkM5gTaC'
  15.     );
  16.  
  17.     $ch = curl_init('http://vacban.wtf/index.php/api/auth?login='.$login.'&password='.$password.'');
  18.     curl_setopt($ch, CURLOPT_HTTPHEADER, $customHeaders);
  19.     curl_setopt($ch, CURLOPT_POST, 1);
  20.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  21.     $json = curl_exec($ch);
  22.     curl_close($ch);
  23. }
  24.  
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement