سؤال

I am using this http://nunzioweb.com/streaming_audio-example.htm to embed and play.mp3 files

The problem is that the above method uses a file that contains a link to .mp3 files

Eg: the list contains various MP3 files such as

http://www.domain.com/music/getsong.php?id=21
http://www.domain.com/music/getsong.php?id=22
http://www.domain.com/music/getsong.php?id=23

I am using getsong.php to verity if the user is logged in via session variables and cookies. But, the getsong.php when accessed in this manner(via embed WMP) fails to do the user verification even if the user is logged in.

But when accessed directly via http://www.domain.com/music/getsong.php?id=23 the user verification works fine.

Are the headers sent by the embedded WMP different than the one sent when accessing the URL Directly?

هل كانت مفيدة؟

المحلول

As far as I know - WMP in its internal subrequest tries to use cookies (including those with information about session) from IE and is not able to get them from another browser. You can check it analyzing the cookie part of the request headers. For not so secure solution you may include PHPSESSID or its renamed version into the url, so that it will be submitted by the player, too.

For security purposes you may try to rename the session with each request created not by the player :)

ps: why won't you use normal flash player?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top