• 例子 重启服务器

  • PHP 语言

      <?php
      //构建请求头
      $requestHeader = array(
      "Content-Type: application/json",
      "X-Auth-Token:这里填写您服务器Token令牌值"
      );
    
      $ch = curl_init("https://f.upkk.com/plugin.php?id=srcds_server_user_manager:api_v1&module=L-app-restart"); 
    
      curl_setopt($ch,CURLOPT_HEADER,0);
      curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch,CURLOPT_HTTPHEADER, $requestHeader);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
      curl_setopt($ch, CURLOPT_CONNECTTIMEOUT , 20);
      curl_setopt($ch, CURLOPT_TIMEOUT, 20);
      $data = curl_exec($ch);
      curl_close($ch);
    
      echo $data;
作者:admin  创建时间:2020-09-04 14:41
 更新时间:2022-04-09 00:14