Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on PHP Question in the Open Discussion & Chit-chat forum
Hello! I want a way to have one page display all my flash movies (instead of having 50 different pages). I know there is a ...

  1. #1
    JPC Member
    Join Date
    Nov 2004
    Posts
    11

    PHP Question

    Hello! I want a way to have one page display all my flash movies (instead of having 50 different pages).
    I know there is a way to…
    Call the main file: MY_FLASH_MOVIE_PAGE.php?whatever. How do you get that “whatever” from there.
    What I want to do is…
    http:\\site.gh/MY_FLASH_MOVIE_PAGE.php?http:\\site,gh/nothing.swf
    Copy the nothing.swf and paste it in the code for the flash player.

    < object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
    <param name="movie" value="__Paste here__">
    <param name="quality" value="high">
    <embed src="___Also Here___" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ></embed></object>


    Anyone know how do do that? Thanks for the help.
    -Dave http://www.thundergaming.net

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I'd recommend reading up on the basics of PHP, beginning with this page from the PHP manual. Also try searching for beginner PHP tutorials with your favorite search engines--there are many out there. I could tell you exactly what to do, but you wouldn't take anything away from it except a free PHP script. Take some time to learn a little about PHP and it will be much more rewarding.

    To get you started, the text passed after the ? in a URL is known as the query string. It is intended to be a series of key-value pairs. An = separates the key name and its value and each pair is separated by an &.

    Example: somescript.php?key1=value1&key2=value2

    If a query string is present and in this format, PHP automatically parses through it and separates out the individual pars into an array called $_GET. Read up on how to use variables from outside of PHP and printing output to the screen you should have a good an idea of what to do.

    If you do all of that and still have questions, I'd be happy to help.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Apathetic
    Join Date
    Sep 2002
    Posts
    31
    An easier way if the PHP manual is overwhelming:

    Say your url is "flashfile.php?foobar". $_SERVER['QUERY_STRING'] will be "foobar".
    Code:
    <?php
    echo "<embed src=\"{$_SERVER['QUERY_STRING']}.swf\">";
    ?>
    would produce:
    Code:
    <embed src='foobar.swf'>
    "We have normality. I repeat, we have normality. Anything you still can't cope with is therefore your own problem."
    - Douglas Adams

Bookmarks

Posting Permissions

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