トレント ファイルのダウンロードを許可するカスタム php アプリケーションを作成しています。ファイルはサーバー上にあり、ユーザーの要求ごとに、次の方法でファイルを提供します。
if( file_exists( $torrent_file ) ) {
header("Content-type: application/x-bittorrent");
header('Content-Length: ' . filesize( $torrent_file ));
header('Content-Disposition: attachment; filename="' . basename( $torrent_file ).'"');
readfile($torrent_file);
}
しかし、ファイルをダウンロードして uTorrent に追加しようとすると、次のエラーが表示されます。
読み込めません - トレントは有効なベンコーディングではありません。
私はこの正確な問題の解決策を見つけるために周りを検索しましたが、成功しませんでした。