yehchge / ycurl
在 WordPress 中使用 curl 进行 Http get & post
v1.0.2
2023-07-20 04:25 UTC
Requires
- php: >=5.3.0
Suggests
- ext-curl: Required for CURL handler support
This package is auto-updated.
Last update: 2024-09-20 08:36:04 UTC
README
curl http url
安装
composer require "yehchge/ycurl"
基本用法
curl url
<?php declare(strict_types=1); include "vendor/autoload.php"; use yehchge\ycurl\CCurl; // sample get $CCurl = new CCurl(); $output = $CCurl->fetch('GET', 'https://example.com/'); if(preg_match("/Example Domain/", $output)){ echo "A match was found."; }else{ echo "A match was not found."; }