pecl_http の http_post_fields に同様の機能はありますか? 私の現在のホストは、http://pear.php.net/から拡張機能のみをインストールします(理由はわかりませんが、ssh アクセスではなく Web GUI を持っていないため、そこから入手できる拡張機能のみをインストールできます)。
ここに私のコードがあります
<?php
$files = array(
array(
'name' => 'torrent', // Don't change
'type' => 'application/x-bittorrent',
'file' => '0-273-70244-0.pdf.torrent' // Full path for file to upload
)
);
$http_resp = http_post_fields( 'http://torcache.net/autoupload.php', array(), $files );
$tmp = explode( "\r\n", $http_resp );
$infoHash = substr( $tmp[count( $tmp ) - 1], 0, 40 );
var_dump($infoHash);
unset( $tmp, $http_resp, $files );
現在、これは http_post_fields の未定義の関数を取得しているため機能しません