eoin has asked for the wisdom of the Perl Monks concerning the following question:

Alright all, hope your all good. I was wondering if you could help me with this really stupid question.

Whats bothering me is that I have a script to print a html page to a browser(This page contains flash). This script has one argument, the $ENV{"QUERY_STRING"} which in this case would be http://eoinmurphy.netfirms.com/cgi-bin/game.cgi?Tetriswm Now this should open a webpage with the Tetris flash game on it, but it doesn't load the flash file. The rest of the page loads but the flash box stays blank. When I right click on it the box says that the movie hasn't loaded. I've already searched perlmonks and found this but it didn't help at all. All the problems described in those replies are not relevent to this question.

Heres the script's code:
my $game = $ENV{"QUERY_STRING"}; print qq(Content-type: text/html\n <html> <head> <title>$game</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> </head> <body bgcolor="#3366CC"> <table cellspacing="0" cellpadding="0" border="0" align="center"> <tr valign="middle"> <td width="550" height="107"> <div align="center"><b><font color="#FFFFFF" face="Arial, Helvetica, s +ans-serif" size="5">SMURFGAMES.CJB.NET Presents</font></b></div> </td> </tr> <tr> <td width="550" height="365" colspan="6" rowspan="4" valign="top"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase= +"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab# +version=4,0,2,0" width="550" height="360"> <param name=movie value="http://eoinmurphy.netfirms.com/flash/$game.sw +f"> <param name=quality value=high> <embed src="http://eoinmurphy.netfirms.com/flash/$game.swf" quality=hi +gh pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1 +_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wi +dth="550" height="360"> </embed> </object></td> </tr> <tr> <td width="550" height="1" valign="top"><img width="550" height="1" sr +c="transparent.gif"></td> </tr> </table> </body> </html> );

I would be honoured if you would state your opinions on my problem.
All the Best, Eoin...

If everything seems to be going well, you obviously don't know what the hell is going on.

Replies are listed 'Best First'.
Re: GONE in a FLASH!
by jacques (Priest) on Mar 01, 2003 at 22:59 UTC
      I just did now. I dunno what the message is about. I'll have to check with my web hosting services.
      Eoin
Re: GONE in a FLASH!
by Anonymous Monk on Mar 02, 2003 at 23:00 UTC
    Since no one has pointed this out...

    You really really should do some sort of verification on the data in QUERY_STRING. As it stands now, a malicious user could inject any HTML they'd like into your page.

    -AM

Re: GONE in a FLASH!
by chromatic (Archbishop) on Mar 01, 2003 at 23:02 UTC

    What does the resultant HTML contain? I just went to http://eoinmurphy.netfirms.com/flash/Tetriswm.swf and received an error message.

Re: GONE in a FLASH!
by zby (Vicar) on Mar 03, 2003 at 09:30 UTC
    According to the mentioned environement the line:
    <embed src="http://eoinmurphy.netfirms.com/flash/$game.swf"
    will be evaluated to:
    <embed src="http://eoinmurphy.netfirms.com/flash/http://eoinmurphy.net +firms.com/cgi-bin/game.cgi?Tetriswm.swf"
Re: GONE in a FLASH!
by eoin (Monk) on Mar 03, 2003 at 22:31 UTC
    Thanks for the help, downvotes were deserved due to my dumbness of check file size limits with my free web host service. My Bad. If anyone knows a better service please feel free to let me know.
    All the Best, Eoin...

    If everything seems to be going well, you obviously don't know what the hell is going on.

Re: GONE in a FLASH!
by jdporter (Paladin) on Mar 03, 2003 at 03:14 UTC
    As much as I hate to do it, I downvoted your node, because it has zero Perl relevance.

    Also, --Louis_Wu and --Enlil for approving and front-paging it, respectively.

    jdporter
    The 6th Rule of Perl Club is -- There is no Rule #6.

      As much as I hate to do it, I downvoted your node, because it has zero Perl relevance.

      What? He's presenting us with a Perl script that does not give him the desired results. Yes, the solution has nothing to do with Perl, but he probably didn't know that initially, especially since he didn't check if the movie actually worked. If you are going to downvote him, downvote him because he apparently made no effort to properly troubleshoot his problem.

      Also, --Louis_Wu and --Enlil for approving and front-paging it, respectively.

      Agreed. When no one answers a question right way, it doesn't mean that the question must be good and thus worthy of the front page.