0
私のワードプレスサイトの曲のストリームURLを隠すために、このコードを使用します...これは、example.com/audio.mp3 urlはexample.com/streem.php?id= 53502HTML5オーディオタグのストリームURLを非表示にする
私は、デフォルトのHTML 5のプレーヤーでそれをテストしてきたし、それはChromeとIEで動作しますが、これはこのプレーヤーで作業されていません:http://goo.gl/HziDr
は、誰もが私のコードはokです教えてもらえますか?
streem.phpのコードは次のとおりです。
<?php
require('./wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();
$attachmentID = $_GET['id'];
$attachment = get_attached_file($attachmentID , false);
header("Content-Transfer-Encoding: binary");
header('Content-Length: '. (string)filesize($attachment)); // provide file size
header('Content-type: audio/mpeg');
header('Cache-Control: no-cache');
readfile($attachment);
exit;
?>
はい、動作しています。ありがとうございました。 – Nesooo