嗨,我在下面编写了此代码以使用 bigcommerce API。但它似乎有一些服务器问题。我的服务器是 PHP >5.3 & curl 启用但 API 似乎没有返回任何响应。谁能帮我解决这个问题?
这是我的代码
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://store-bwvr466.mybigcommerce.com/api/v2');
curl_setopt($ch, CURLOPT_USERPWD, 'demo'.':'.'df38dd10e9665a3cfa667817d78ec91ee9384bc3');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));
$result = curl_exec($ch);
curl_close($ch);
echo "<textarea>".$result."</textarea>";
phpinfo();
您可以将其签入我的实时服务器http://fuzonmedia.com/big/server_test.php
谢谢