I use this code below to hide stream url of songs for my wordpress site … this mean instead of: mysite.com/audio.mp3 url is mysite.com/streem.php?id=53502 I have tested it with default html 5 player and it works on chrome and IE, but this is not working with this player: http://goo.gl/HziDr Can anybody tell me is my code ok? Code of streem.php is: <?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; ?> PHP:
I can't test that player, since I don't have a copy of their code, and probably most people here don't. The best way for you to test this is to run an HTTP debugger on your development machine. Fiddler is a very good option on Windows. This will allow you to see the HTTP responses, you can then copy that into a diff tool such as Winmerge. In the diff tool you can see the difference between your output and a working one (e.g. the one on codecanyon)