jQuery jPlayer play remote url: "NetworkError: 403 Forbidden" -
i using jquery jplayer circular skin on site play remote urls, following code works fine, except if url particular domain, (call http://prob.lem), getting "networkerror: 403 forbidden - http://prob.lem/upload_music/7154816.mp3"
, although have no problem either use browser, or use wget, download mp3. knowledge on jquery limited, best guess jquery jplayer sends request differently usual browser or wget (wrong?), other detects , refuse serve content.
the question is: assuming guessed right, there work around site jplayer still gets content? if guess wrong, else should at? thanks,
<script type="text/javascript"> //<![cdata[ var $j = jquery.noconflict(); $j(document).ready(function(){ var mycircleplayer = new circleplayer("#jquery_jplayer_1", { mp3: "http://prob.lem/upload_music/7154816.mp3" }, { cssselectorancestor: "#cp_container_1", supplied: "mp3", swfpath: "wp-content/plugins/magic-media-box/js/jplayer.swf", wmode: "window", keyenabled: true, }); }); //]]> </script>
also, below request information firebug:
response headers http/1.1 403 forbidden date: tue, 23 jul 2013 20:24:25 gmt server: apache content-length: 291 connection: close content-type: text/html; charset=iso-8859-1 request headers /upload_music/7154816.mp3 http/1.1 host: prob.lem user-agent: mozilla/5.0 (windows nt 6.1; wow64; rv:22.0) gecko/20100101 firefox/22.0 accept: audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5 accept-language: en-us,en;q=0.5 range: bytes=0- referer: http://my.site/index.php/category/ktv/ connection: keep-alive
if open link directly in firefox, request information different:
response headers http/1.1 200 ok date: tue, 23 jul 2013 20:34:12 gmt server: apache last-modified: sun, 21 jul 2013 23:05:06 gmt etag: "1b2803e-b5ffef-4e20d97386aba" accept-ranges: bytes content-length: 11927535 connection: close content-type: audio/mpeg request headers /upload_music/7154816.mp3 http/1.1 host: prob.lem user-agent: mozilla/5.0 (windows nt 6.2; wow64; rv:22.0) gecko/20100101 firefox/22.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate connection: keep-alive
what can see in request headers, accept
, accept-encoding
string different, , hence responses different. can let jquery jplayer send identical headers firefox browser?
thanks,
Comments
Post a Comment