mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 23:19:05 +00:00
0. 更新项目依赖包; 1. 适配Payment依赖包5.0的代码修改; 2. 独立化节点阻断检测功能; 现在运行管理在节点页面,单独测试节点; 3. 节点阻断检测通知功能不再是一个报告一个报告发,改为一次检测只在有阻断出现情况下,统一发送结果; 4. 修改激活逻辑; 5. 修复重复优惠券SN码无报错的问题;现在优惠码为唯一码,不允许重复码出现; 6. 添加用户获取节点信息时按钮的动画加载效果; 7. 修复管理系统页面部分选项输入任何值都会报错的问题; 8. 代码命名与书写规范化;
32 lines
659 B
PHP
32 lines
659 B
PHP
<?php
|
||
|
||
namespace App\Components;
|
||
|
||
class Curl
|
||
{
|
||
/**
|
||
* @param string $url 请求地址
|
||
* @param array $data 数据,如果有数据则用POST请求
|
||
*
|
||
* @return mixed
|
||
*/
|
||
public static function send($url, $data = [])
|
||
{
|
||
$ch = curl_init();
|
||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||
curl_setopt($ch, CURLOPT_URL, $url);
|
||
|
||
if($data){
|
||
curl_setopt($ch, CURLOPT_POST, 1);
|
||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||
}
|
||
|
||
$result = curl_exec($ch);
|
||
curl_close($ch);
|
||
|
||
return $result;
|
||
}
|
||
} |