Vine oEmbed - 500内部服务器错误 - Rackspace服务器

时间:2015-11-23 10:45:18

标签: php twitter rackspace oembed vine

我正在尝试通过oEmbed API提取Vine的JSON数据。该请求在浏览器和我的本地计算机和另一台服务器上运行良好。这是我的代码

$curl_url = 'https://vine.co/oembed.json?url=https%3A%2F%2Fvine.co%2Fv%2FMl16lZVTTxe';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "com.vine.iphone/1.0.3 (unknown, iPhone OS 6.1.0, iPhone, Scale/2.000000)");
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
curl_close($ch);
if (!$result){echo curl_error($ch);}
print_r($result);

但是,只要我在德克萨斯地区的My Rackspace服务器上运行它,就会将 HTML格式作为文本响应500内部服务器错误作为文本(实际http状态代码为200)。我已添加以下响应屏幕截图的链接以供参考。

Image of the response from vine/twitter

我已经与Rackspace支持人员谈过,似乎Twitter / Vine方面阻止了我们服务器的IP到达API。我也在Twitter上发布过它,但没有回复 - https://twittercommunity.com/t/vine-oembed-500-internal-server-error-rackspace-server/56478

我的最终目标是获取视频的缩略图而不会出现内部服务器错误。

0 个答案:

没有答案