Results 1 to 3 of 3

Thread: why get and post is not working for this url?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    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:
    1. <smil>
    2.     <head>
    3.        <layout type="text/smil-basic-layout">
    4.       <root-layout id="root" height="2" width="2" background-color="black"/>
    5.         </layout>
    6.     </head>
    7.     <body>
    8.         <seq>
    9.        <audio src="http://remotsite.com/new/play.php?d=04&song=2353"/>
    10.        <audio src="http://remotsite.com/new/play.php?d=04&song=2354"/>
    11.        <audio src="http://remotsite.com/new/play.php?d=04&song=2355"/>
    12.         </seq>
    13.     </body>
    14. </smil>

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    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


  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width