PDA

Click to See Complete Forum and Search --> : why get and post is not working for this url?


tony007
Apr 30th, 2006, 02:22 PM
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


<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>

john tindell
Apr 30th, 2006, 02:29 PM
My guess is that the file checks the user-agent and if its not real player it sends the error message.


if($_SERVER['HTTP_USER_AGENT']=="your_user_agent")
{
//load your file
}
else
{
//load the error message
}

tony007
Apr 30th, 2006, 02:37 PM
My guess is that the file checks the user-agent and if its not real player it sends the error message.


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