why get and post is not working for this url?
Hi all i came accross this [/b]smil[b] file that if i open it with real audio player it starts playing the 3 songs one by one. But if i try to put one of the urls in browser i do not get songs instead i get a voice says the song could not be found!!
I wonder how they did that since i want to do the same for some of my files on my webserver. Could an expert tell me how this is possible and how it works that real audo player can get the songs and play them but direct url will give failed massge.Thanks
VB Code:
<smil>
<head>
<layout type="text/smil-basic-layout">
<root-layout id="root" height="2" width="2" background-color="black"/>
</layout>
</head>
<body>
<seq>
<audio src="http://remotsite.com/new/play.php?d=04&song=2353"/>
<audio src="http://remotsite.com/new/play.php?d=04&song=2354"/>
<audio src="http://remotsite.com/new/play.php?d=04&song=2355"/>
</seq>
</body>
</smil>
Re: why get and post is not working for this url?
My guess is that the file checks the user-agent and if its not real player it sends the error message.
PHP Code:
if($_SERVER['HTTP_USER_AGENT']=="your_user_agent")
{
//load your file
}
else
{
//load the error message
}
Re: why get and post is not working for this url?
Quote:
Originally Posted by john tindell
My guess is that the file checks the user-agent and if its not real player it sends the error message.
PHP Code:
if($_SERVER['HTTP_USER_AGENT']=="your_user_agent")
{
//load your file
}
else
{
//load the error message
}
Many thanks for u reply. could u tell me how i can check agent of the user pc who requested my php page ? For example how i know if it is real audio or mp3 player or ... I be happy if u explain that to me. Furthermor, if i want those who are using medial player get my file then what should i put instead of your_user_agent?Thanks