<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1022424" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1022424</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138542</link>
    <description> &lt;p&gt;ok...i&#039;ll try it&lt;/p&gt;
 </description>
     <pubDate>Tue, 30 Sep 2003 01:42:59 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1138542 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138505</link>
    <description> &lt;p&gt;If this doesn&#039;t work I give up. I tested it on my server, by setting up an exact directory structure as you. Make sure you give write permissions to the thumb, full and upload dirs.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$uploaddir &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;/home/swimtige/public_html/img/pics/\&quot;; // Path to full image folder&lt;br /&gt;&lt;br /&gt;if (move_uploaded_file(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;tmp_name\&quot;], &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uploaddir&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;name\&quot;]))&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;// Move the original uploaded file to the pics directory&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uploaddir&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;name\&quot;]; // /home/swimtige/public_html/img/pics/pic.jpg&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;name\&quot;]; // pic.jpg&lt;br /&gt;// Set a few variables&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = getimagesize(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;; // Find out the height and width attriutes of image&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newHeight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = 100;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newWidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = 100; // Set the new height and width of thumbnail&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = ImageCreateFromJPEG(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = ImageCreateTrueColor(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newWidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newHeight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;imagecopyresampled(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,0,0,0,0,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newWidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newHeight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;ImageJPEG(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;); &lt;br /&gt;// Thumbnail picture is created in /upload/ dir&lt;br /&gt;&lt;br /&gt;copy(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, \&quot;/home/swimtige/public_html/img/thumbs/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;// So move it to /thumbnail/ dir&lt;br /&gt;&lt;br /&gt;unlink(\&quot;home/swimtige/public_html/upload/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;); &lt;br /&gt;// Delete the useless thumbnail in /upload/ dir&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;else {&lt;br /&gt;echo \&quot;Image upload failed!\&quot;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 29 Sep 2003 03:49:44 +0000</pubDate>
 <dc:creator>nuk3</dc:creator>
 <guid isPermaLink="false">comment 1138505 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138487</link>
    <description> &lt;p&gt;Heres the working code straight from my image gallery script:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$uploaddir &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;/home/swimtige/public_html/img/thumbs/\&quot;;&lt;br /&gt;&lt;br /&gt;move_uploaded_file(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;tmp_name\&quot;], &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uploaddir&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;name\&quot;])&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uploaddir&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;name\&quot;];&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;userfile\&quot;][\&quot;name\&quot;];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=getimagesize(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newHeight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=100;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newWidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=100;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=ImageCreateFromJPEG(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=ImageCreateTrueColor(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newWidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newHeight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;imagecopyresampled(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,0,0,0,0,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newWidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newHeight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;ImageJPEG(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,\&quot;TN_\&quot;.\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture3&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=\&quot;TN_&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;;&lt;br /&gt;copy(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture3&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, \&quot;/home/swimtige/public_html/img/thumbs/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture3&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;unlink(\&quot;PATH TO THE FOLDER WHICH THE SCRIPT IS IN/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture3&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt; &lt;/p&gt;
&lt;p&gt;This basically uploads an image, puts it in a folder and creates a thumbnail of it in the same directory. Hopefully it&#039;ll work this time..&lt;/p&gt;
 </description>
     <pubDate>Sun, 28 Sep 2003 13:40:39 +0000</pubDate>
 <dc:creator>nuk3</dc:creator>
 <guid isPermaLink="false">comment 1138487 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138475</link>
    <description> &lt;p&gt;alright, well i put it in with the upload script, and it doesn&#039;t work.  (i had to mod it a little bit)...here&#039;s the errors i get (i tried to upload mountains.jpg):&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Warning: getimagesize: Unable to open &amp;#039;mountains.jpg&amp;#039; for reading. in /.../do_upload.php on line 86&lt;br /&gt;&lt;br /&gt;Warning: imagecreatefromjpeg: Unable to open &amp;#039;mountains.jpg&amp;#039; for reading in /.../do_upload.php on line 93&lt;br /&gt;&lt;br /&gt;Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /.../do_upload.php on line 99&lt;br /&gt;&lt;br /&gt;Warning: imagejpeg: unable to open &amp;#039;mountains.jpg&amp;#039; for writing in /.../do_upload.php on line 100&lt;br /&gt;&lt;br /&gt;Warning: Unable to open &amp;#039;mountains.jpg&amp;#039; for reading: No such file or directory in /.../do_upload.php on line 104&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;and the php (including the final upload part of my code):&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;img1&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] != \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;\&quot;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; copy(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;img1&#039;][&#039;tmp_name&#039;], \&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ufolder&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;img1&#039;][&#039;name&#039;]) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die(\&quot;Couldn&#039;t copy the file!\&quot;);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; die(\&quot;No input file specified\&quot;);&lt;br /&gt;}&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;img1&#039;] != \&quot;\&quot;) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;img1\&quot;][\&quot;name\&quot;]; // Assign the uploaded file to &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = getimagesize(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;); // Get the size of the image&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; / 2; // Halve the height&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; / 2; // Halve the width&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = ImageCreateFromJPEG(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // New image will be based on old image (hence \&quot;create from\&quot;)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = ImageCreateTrueColor(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a new JPEG image with new height and width&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; imagecopyresampled(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,0,0,0,0,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ImageJPEG(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Old image will be added/pasted onto to the new image&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create the image&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; copy(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, \&quot;/home/swimtige/public_html/img/thumbs/\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy it to another directory&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; die(\&quot;Could not copy and resize image.\&quot;);&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;
 </description>
     <pubDate>Sun, 28 Sep 2003 04:31:41 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1138475 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138474</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$picture &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_FILES&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;userfile\&quot;][\&quot;name\&quot;]; // Assign the uploaded file to &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = getimagesize(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;); // Get the size of the image&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$size&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; / 2; // Halve the height&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; / 2; // Halve the width&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = ImageCreateFromJPEG(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;// New image will be based on old image (hence \&quot;create from\&quot;)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = ImageCreateTrueColor(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;// Create a new JPEG image with new height and width&lt;br /&gt;&lt;br /&gt;imagecopyresampled(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$oldImage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,0,0,0,0,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newwidth&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newheight&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$width&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$height&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;ImageJPEG(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$newimage&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;// Old image will be added/pasted onto to the new image&lt;br /&gt;// Create the image&lt;br /&gt;&lt;br /&gt;copy(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, \&quot;PATH TO WHERE IMAGE WILL IMAGE BE COPIED\&quot;);&lt;br /&gt;// Copy it to another directory&lt;br /&gt;&lt;br /&gt;unlink(\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$picture&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;// Delete the image&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I think that should work..&lt;/p&gt;
 </description>
     <pubDate>Sun, 28 Sep 2003 03:58:05 +0000</pubDate>
 <dc:creator>nuk3</dc:creator>
 <guid isPermaLink="false">comment 1138474 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138401</link>
    <description> &lt;p&gt;cool...&lt;/p&gt;
&lt;p&gt;is there a way, that when someone uploads a picture/photo, it copies it to another directory, but resizes the image?&lt;/p&gt;
&lt;p&gt;Example:&lt;br /&gt;
I upload a picture, named &#039;me.jpg&#039;&lt;br /&gt;
It copies it to &#039;menew.jpg&#039;, and resizes it from 800x600 to 400x300&lt;/p&gt;
&lt;p&gt;thanks for the help.&lt;/p&gt;
 </description>
     <pubDate>Fri, 26 Sep 2003 01:35:54 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1138401 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138399</link>
    <description> &lt;p&gt;Ya beat me to it Andy&lt;br /&gt;
Good work&lt;/p&gt;
 </description>
     <pubDate>Fri, 26 Sep 2003 00:39:33 +0000</pubDate>
 <dc:creator>nike_guy_man</dc:creator>
 <guid isPermaLink="false">comment 1138399 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138360</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$SCRIPT_NAME&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$SERVER_VARS&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;PHP_SELF&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;];&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pic&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;pic&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;];&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; the directory name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$handle&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;opendir&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;full/&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; initialize variables&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=array();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$count&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; read directory into pics array&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;while ((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;readdir&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$handle&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))!==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; filter for jpg, gif or png files...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;substr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,-&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) == \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;.jpg\&quot; || substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,-4) == \&quot;.gif\&quot; || substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,-4) == \&quot;.png\&quot; || substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,-4) == \&quot;.JPG\&quot; || substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,-4) == \&quot;.GIF\&quot; || substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,-4) == \&quot;.PNG\&quot;){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$count&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$count&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;++;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; don&#039;t forget to close the filter conditions here!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;closedir(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$handle&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; done reading, sort the filenames alphabetically, comment these lines if you want no sorting&lt;br /&gt; sort(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt; reset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // loop over images&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=0;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;=sizeof(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)-1;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;++){&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;a href=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;full&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; target=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;_blank&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;&amp;lt;img src=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;thumbs&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pics&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; hspace=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; vspace=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; border=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/a&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // make linebreaks every 2 times!&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$isbr&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = strpos(((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;+1)/2),\&quot;.\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$isbr&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){echo \&quot;&amp;lt;br&amp;gt;\&quot;;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt; &lt;/p&gt;
&lt;p&gt;I think it&#039;ll do what you need... let me know if you have any questions. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 25 Sep 2003 14:29:21 +0000</pubDate>
 <dc:creator>andy206uk</dc:creator>
 <guid isPermaLink="false">comment 1138360 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138359</link>
    <description> &lt;p&gt;I have a script for doing this... I&#039;ll be back in a min with the code. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 25 Sep 2003 14:26:09 +0000</pubDate>
 <dc:creator>andy206uk</dc:creator>
 <guid isPermaLink="false">comment 1138359 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/image-display#comment-1138345</link>
    <description> &lt;p&gt;wow, way over my head.&lt;/p&gt;
&lt;p&gt;any links to check out other than the readdir() or examples that you can give me?  the php.net link didn&#039;t make alot of sense, and I would rather try and write my own than copy someone&#039;s.&lt;/p&gt;
 </description>
     <pubDate>Thu, 25 Sep 2003 02:04:03 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1138345 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
