cube-group / myaf-net
net
Installs: 8 040
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
This package is not auto-updated.
Last update: 2024-11-08 13:05:30 UTC
README
常用属性
- 请求尝试的次数: $curl->try
- 请求尝试的最大次数: $curl->tryMax
- 请求耗时(单位:毫秒): $curl->useTime
常规用法
$curl = new LCurl();
$curl->post('http://google.com',['a'=>'1'],['X-Token'=>'test'],15);
$curl->post('http://google.com','<xml><item><a>1</a></item></xml>');
$curl->get('http://google.com');
$curl->get('http://google.com',['a'=>'1']);
设定尝试次数
$curl = new LCurl(['tryMax'=>3]);
$curl->post('http://google.com',['a'=>'1'],['X-Token'=>'test'],15);
echo 'try: '.$curl->try;
钉钉机器人
$ding = new LDing('钉钉群报警机器人地址'); $ding->send('发什么都可以');