<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1028234" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1028234</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-design-and-graphics/need-suggesstions-please#comment-1166592</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;?&lt;br /&gt;function get_folder_contents($folder,$type)&lt;br /&gt;	{&lt;br /&gt;	if ($handle = opendir($folder))&lt;br /&gt;		{&lt;br /&gt;		while (false !== ($file = readdir($handle)))&lt;br /&gt;			{&lt;br /&gt;			if(ereg(&amp;quot;.+\.$type&amp;quot;,$file))&lt;br /&gt;				{&lt;br /&gt;				$file = str_replace(&amp;quot;.$type&amp;quot;,&amp;quot;&amp;quot;,$file);&lt;br /&gt;				$list[] = &amp;quot;$file&amp;quot;;&lt;br /&gt;				}&lt;br /&gt;			}&lt;br /&gt;		closedir($handle);&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
usage:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;?&lt;br /&gt;$list = get_folder_contents(&amp;#039;flashgames/&amp;#039;,&amp;#039;swf&amp;#039;);&lt;br /&gt;while(list($k,$v) = each($list))&lt;br /&gt;	{&lt;br /&gt;	echo &amp;quot;&amp;lt;a href=\&amp;quot;game.php?game=$v\&amp;quot;&amp;gt;$v&amp;lt;/a&amp;gt;&amp;quot;;&lt;br /&gt;	}&lt;br /&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;The only drawback would be the inability to get the width and height that way, but that can be fixed by naming the files like bmx.550.400.swf, with that you could:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;?&lt;br /&gt;$list = get_folder_contents(&amp;#039;flashgames/&amp;#039;,&amp;#039;swf&amp;#039;);&lt;br /&gt;while(list($k,$v) = each($list))&lt;br /&gt;	{&lt;br /&gt;	$varray = explode(&amp;#039;.&amp;#039;,$v);&lt;br /&gt;	echo &amp;quot;&amp;lt;a href=\&amp;quot;game.php?game=$v&amp;amp;w=$varray[1]&amp;amp;h=$varray[2]\&amp;quot;&amp;gt;$v&amp;lt;/a&amp;gt;&amp;quot;;&lt;br /&gt;	}&lt;br /&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;The other option with naming them like that, is you could slim it to one variable, and then do the explode(&#039;.&#039;) in the game.php file&lt;/p&gt;
 </description>
     <pubDate>Tue, 22 Feb 2005 03:27:54 +0000</pubDate>
 <dc:creator>CptAwesome</dc:creator>
 <guid isPermaLink="false">comment 1166592 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-design-and-graphics/need-suggesstions-please#comment-1166569</link>
    <description> &lt;p&gt;how would you go about doing it automatically?  i thought that I had seen a script that would do something like this, and you just put all the swf files into a directory.  then you could add descriptions and make them searchable...&lt;/p&gt;
 </description>
     <pubDate>Mon, 21 Feb 2005 16:06:22 +0000</pubDate>
 <dc:creator>WuLabsWuTecH</dc:creator>
 <guid isPermaLink="false">comment 1166569 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-design-and-graphics/need-suggesstions-please#comment-1166547</link>
    <description> &lt;p&gt;Wow, that would take yeah, forever, and there is frighteningly easy solution. The following into a file named game.php will do the trick&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;?&lt;br /&gt;//Step 1: This is the list of games, each is seperated with a | and omit the .swf when listing them.&lt;br /&gt;$listofgames = &amp;quot;game1filename|game2filename|game3filename&amp;quot;;&lt;br /&gt;$list = explode(&amp;quot;|&amp;quot;,$listofgames);&lt;br /&gt;//Step 1 end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Step 2: Check if the width and height are set, if not, set a default&lt;br /&gt;if(is_numeric($_GET[&amp;#039;w&amp;#039;])){&lt;br /&gt;	$width = $_GET[&amp;#039;w&amp;#039;];&lt;br /&gt;}else{&lt;br /&gt;	$width = 640;	//default&lt;br /&gt;}&lt;br /&gt;if(is_numeric($_GET[&amp;#039;h&amp;#039;])){&lt;br /&gt;	$height = $_GET[&amp;#039;h&amp;#039;];&lt;br /&gt;}else{&lt;br /&gt;	$height = 480;	//default;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Step 3: Verify the game requested exists, output it if it does, and error if it doesn&amp;#039;t&lt;br /&gt;if(in_array($_GET[&amp;#039;game&amp;#039;],$list))&lt;br /&gt;	{&lt;br /&gt;	$movie = $_GET[&amp;#039;game&amp;#039;];&lt;br /&gt;	echo &amp;quot;&amp;lt;object width=&amp;quot;.$width.&amp;quot; height=&amp;quot;.$height.&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;	echo &amp;quot;&amp;lt;param name=\&amp;quot;movie\&amp;quot; value=\&amp;quot;$movie.swf\&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;	echo &amp;quot;&amp;lt;embed src=\&amp;quot;.$movie.swf\&amp;quot; width=&amp;quot;.$width.&amp;quot; height=&amp;quot;.$height.&amp;quot;&amp;gt;\n&amp;quot;;&lt;br /&gt;	echo &amp;quot;&amp;lt;/embed&amp;gt;\n&amp;quot;;&lt;br /&gt;	echo &amp;quot;&amp;lt;/object&amp;gt;\n&amp;quot;;&lt;br /&gt;	}&lt;br /&gt;else&lt;br /&gt;	{&lt;br /&gt;	echo &amp;quot;Game not in our database, sorry&amp;quot;;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;//Step 4: Thank yourself for not spending a month hardcoding a million HTML pages.&lt;br /&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;All links to the games would be written as such:&lt;br /&gt;
game.php?game=gamename&amp;amp;w=400&amp;amp;h=550&lt;/p&gt;
&lt;p&gt;there are ways to do this automatically as well.&lt;/p&gt;
 </description>
     <pubDate>Mon, 21 Feb 2005 09:15:23 +0000</pubDate>
 <dc:creator>CptAwesome</dc:creator>
 <guid isPermaLink="false">comment 1166547 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-design-and-graphics/need-suggesstions-please#comment-1166545</link>
    <description> &lt;p&gt;I use Swishmax, not Flash, but it lets you load movies one on top of another...I&#039;m sure Flash itself must allow you to &#039;layer&#039; .swf&#039;s the same way?&lt;/p&gt;
 </description>
     <pubDate>Mon, 21 Feb 2005 06:25:09 +0000</pubDate>
 <dc:creator>Roo</dc:creator>
 <guid isPermaLink="false">comment 1166545 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
