【发布时间】:2015-06-08 04:06:59
【问题描述】:
我被要求处理网络钩子概念。我对这个概念很陌生,我需要你的帮助。我被要求提供一个公司的 URL,以便他们可以从他们的网站发送 json 数据。
到目前为止,我发现了这个:
// Initiate curl
$ch = curl_init();
// Disable SSL verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Will return the response, if false it print the response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Set the url
curl_setopt($ch, CURLOPT_URL,$url);
// Execute
$result=curl_exec($ch);
// Closing
curl_close($ch);
// Will dump a beauty json :3
var_dump(json_decode($result, true));
那么 URL 和这个 PHP 文件一样吗?我真的很困惑。谢谢你
【问题讨论】: