Der_Clown
Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Cheery sorry, чёт не догнал. куда вложить хидер точно? Код: header('Content-Type: application/json'); | вместо? Код: header( 'Content-type: application/x-bittorrent' ); | да? сорри, что задолбал Добавлено: заменил так, не помогло. Добавлено: смотрю в Chrome "Инструменты разработчика" - "Network" - "Response" - Код: { status:'1', t_complete:'18', t_downloaded:'38', t_incomplete:'8', t_size:'700.11 Mb', t_hash:'ca20781c0ec1a815b1a8c3d53739a041f261370a', t_name:'Don.2.2011.L1.DVDScr.F-Torrent.avi', t_ann:'Все отлично.' } | соответственно понятно, что браузер не может воспринять команду, но так и не пойму где же бок, чтобы понимал и выводил. Добавлено: вот, что у меня в gett.php прописано сейчас. Код: /** Send torrent file to client * @param null|string name of the file (optional) * @return void script exit */ public function send ( $filename = null ) { $data = $this->encode( $this ); header( 'Content-type: application/x-bittorrent' ); header('Content-Type: application/json'); header('Content-Type:text/html'); header( 'Content-Length: ' . strlen( $data ) ); header( 'Content-Disposition: attachment; filename="' . ( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename ) . '"' ); exit( $data ); } |
|