首页 > 解决方案 > PHP SOAP - 给出不存在的 [HTTP] 内部服务器错误

问题描述

通过此处的文档https://itorrents.org/automation.php

我已经添加了他们的示例 torrent(用于测试的 Ubuntu x64)并按照说明添加了代码:

例子...

<?php

ini_set( 'soap.wsdl_cache_enabled', '0' );

$client = new SoapClient('http://itorrents.org/api/torrage.wsdl');
$infoHash = $client->cacheTorrent(base64_encode(file_get_contents('http://itorrents.org/torrent/B415C913643E5FF49FE37D304BBB5E6E11AD5101.torrent')));

echo $infoHash . "\n";

PS:另外,通过下载.torrent文件并添加到文件夹进行本地测试,同样的错误。(添加了直接链接,以便测试的人不必在他们的机器上下载它)

错误日志...

Fatal error: Uncaught SoapFault exception: [HTTP] Internal Server Error in /var/www/htdocs/test/soap.php:6 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://itorren...', 'urn:xmethods-de...', 1, 0) #1 /var/www/htdocs/test/soap.php(6): SoapClient->__call('cacheTorrent', Array) #2 {main} thrown in /var/www/htdocs/test/soap.php on line 6

标签: phpsoap

解决方案


推荐阅读