更新时间:2023-02-24 12:37:55
发布数据>
For posting the data(you can use array though):
$request = 'where={"playerName":"Jonathan Walsh"}&count=1&limit=0';
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$request);
在您的网址中的 https://
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
从curl执行日期返回
To return the date from curl execution
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
最后:
$result = curl_exec($ch);
UPDATE:
未检查您是否正在执行 GET
操作。如果你 GET
,那么它只是
Didn't check that you are doing GET
operation. If you do GET
, then it will be simply
$request = 'where={"playerName":"Jonathan Walsh"}&count=1&limit=0';
$url = "http://example.com/" . "?" . $request;
curl_setopt($ch, CURLOPT_URL,$url);