我尝试使用他们的SOAP API将torrent上传到torcache.net。
<?php
$client = new SoapClient('http://torcache.net/torcache.wsdl');
$info_hash = $client->cacheTorrent(base64_encode(file_get_contents('test.torrent')));
print_r($info_hash);
?>
这是我收到的内容:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in D:\Web\data\localweb\test.php:4
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://torcache...', 'urn:xmethods-de...', 1, 0)
#1 D:\Web\data\localweb\test.php(4): SoapClient->__call('cacheTorrent', Array)
#2 D:\Web\data\localweb\test.php(4): SoapClient->cacheTorrent('ZDg6YW5ub3VuY2U...')
#3 {main}
thrown in D:\Web\data\localweb\test.php on line 4
答案 0 :(得分:0)
参考this,看看您是否可以获得任何帮助。
或
试试这个:
<?php
try {
$x = @new SoapClient("http://torcache.net/torcache.wsdl");
} catch (Exception $e) {
echo $e->getMessage();
}
?>