Ok, im new here and i am need oh some good help.

I don't know too much about php scripting yet but im learning a little, my question is...

does anyone know where i can get a script like the media.php one entensity.net uses to show there videos and what not?

I know its http://posttmp.entensity.net/052104/media.php?media =" whatever the file name is here.avi"

I would like to learn how to do that whole whatever after ?="_____" gets put into the document at a certin place... you know?

Well thanks for any help you can give!

    its very easy to determine what they type in the query string.

    if you have media.php?media=something in your php script, you can access media, like this:
    $_GET['media'];

    basically, they look at that variable and have their script make some kind of decision based on what the value is.
    maybe they select the path from a database or forward them to a certain directory depending on what they type.
    you should also perform some security checks when using this method to make sure the file they type, does exist and is on YOUR server, not theirs because they could execute php code on your site using a url in the string.

      Awsome

      So the script would look something like this? (If i was trying to make there exact page)


      <table width="200" border="1" cellspacing="2" cellpadding="0" bordercolor="#ffffff">

      <tr>
      <td background="http://www.entensity.net/images/pushplay.gif" style="background-repeat: no-repeat" bordercolor="#000000" bgcolor="#EFEFEF">

      <object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft Windows Media Player components...">

      <PARAM NAME="fileName"
      VALUE ="$_GET['media'];">
      <PARAM NAME="animationatStart" VALUE="true">
      <PARAM NAME="transparentatStart" VALUE="true">
      <PARAM NAME="autoStart" VALUE="false">

      <PARAM NAME="showControls" VALUE="true">
      <PARAM NAME="ShowStatusBar" VALUE="True">
      <EMBED TYPE="application/x-mplayer2" PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download"
      ID=MediaPlayer

      Name="mp_426289569"
      Width="320"

      Height="311"

      Src="$_GET['media']; "

      AutoSize="1"

      AutoStart="0"

      ClickToPlay="1"
      DisplaySize="0"

      EnableContextMenu="1"
      EnableFullScreenControls="1"
      EnableTracker="1"

      Mute="0"
      PlayCount="1"
      ShowControls="1"

      ShowAudioControls="1"

      ShowDisplay="0"

      ShowGotoBar="0"

      ShowPositionControls="1"

      ShowStatusBar="1"

      ShowTracker="1">

      </EMBED>
      </OBJECT></td>
      </tr>
      </table>


      Thanks for the help

        you will have to replace

        <PARAM NAME="fileName" VALUE ="$_GET['media'];"> 
        

        with

        <PARAM NAME="fileName" VALUE ="<? print $_GET['media']; ?>">
        

          thanks very much, this helps me out alot, i will tell you how it goes

            Hmm its not working. This is what i did


            <table width="200" border="1" cellspacing="2" cellpadding="0" bordercolor="#ffffff">

            <tr>
            <td background="http://www.entensity.net/images/pushplay.gif" style="background-repeat: no-repeat" bordercolor="#000000" bgcolor="#EFEFEF">

            <object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft Windows Media Player components...">

            <PARAM NAME="fileName" VALUE ="<? print $_GET['media']; ?>">
            <PARAM NAME="animationatStart" VALUE="true">
            <PARAM NAME="transparentatStart" VALUE="true">
            <PARAM NAME="autoStart" VALUE="false">

            <PARAM NAME="showControls" VALUE="true">
            <PARAM NAME="ShowStatusBar" VALUE="True">
            <EMBED TYPE="application/x-mplayer2" PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download"
            ID=MediaPlayer
            Name="mp_426289569"
            Width="320"
            Height="311"
            Src="$_GET['media'];"
            AutoSize="1"
            AutoStart="0"
            ClickToPlay="1"
            DisplaySize="0"
            EnableContextMenu="1"
            EnableFullScreenControls="1"
            EnableTracker="1"
            Mute="0"
            PlayCount="1"
            ShowControls="1"
            ShowAudioControls="1"
            ShowDisplay="0"
            ShowGotoBar="0"
            ShowPositionControls="1"
            ShowStatusBar="1"
            ShowTracker="1">
            </EMBED>
            </OBJECT></td>
            </tr>

            </table>

            nothing seems to happen, when i check the script source it just shows up as no file is being asked to play

              I thought it might help if i give more examples of what i am trying to do.

              Here on this site, they display .SWF files by simply putting the filename (minus the extension of .swf), the height and width.

              http://www.thefucksociety.com/anim.php?id=soc23&w=300&h=300
              http://www.thefucksociety.com/anim.php?id=spaceghost&w=320&h=240
              http://www.thefucksociety.com/anim.php?id=soc15&w=300&h=300

              On this site they can call up any video they have by simply putting the file name at the end of the url

              http://poststuff2.entensity.net/061104/media.php?media=onecar.wmv
              http://poststuff.entensity.net/060804/media.php?media=skerd.wmv

              On that same site they can display any image they want like so

              http://poststuff2.entensity.net/061104/image.php?pic=pretty.jpg
              http://poststuff2.entensity.net/061104/image.php?pic=pool.jpg

              Long story short, i want to be able to have a templete for a video/image/media file so that i can call up whatever i have loaded in that file.

              Thanks a bunch.

                Write a Reply...