title: how to use echo copy with text box with orginal file name
body: <p>Steps of this script.</p>
  
  <ol>
  <li><p>Insert link in text box (like rapidleech) but here I have 2 text box</p></li>
  <li><p>Upload files via echo copy (remote link, my server) (This doesn't work)</p></li>
  <li><p>Print files' HTML info in a textbox (I think here I have an error)</p></li>
  </ol>
  
  <p>note - Just image information important</p>
  
  <p>note - How can get orginal filename and save on server?</p>
  
  <h2>HTML</h2>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;form action="upload_file.php" method="post" enctype="multipart"&gt;
  &lt;label for="file"&gt;thumb link : &lt;/label&gt;
  &lt;input type="text" name="file" id="file" /&gt;
  &lt;br /&gt;
  &lt;label for="file2"&gt;image link : &lt;/label&gt;
  &lt;input type="text" name="file2" id="file2" /&gt;
  &lt;br /&gt;
  &lt;input type="submit" name="submit" value="Submit" /&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h2>PHP</h2>
  
  <pre><code>&lt;?php
  define ( 'IMAGE_DIR', 'img/' );
  define ( 'THUMB_DIR', 'thumb/' );
  $thumblink = "file1";
  $imglink = "file2";
  $printhtml = "printhtml";
  $filesize = "size";
  $filesizelimit = "limit";
  $printtxt = "&lt;center&gt;&lt;img src=\"{$thumblink}\"/&gt;&lt;br/&gt;
              &lt;a href=\"{$imglink}\" target=\"_blank\"&gt;download image&lt;/a&gt; /
              {$filesize} &lt;br/&gt;&lt;/center&gt;";
  // here is dont work show error
  // error   syntax error, unexpected T_STRING
  echo copy("{$thumblink}", THUMB_DIR . '["name"]');
  echo copy("{$imglink}", IMAGE_DIR . '["name"]');
  //
  
  if ((($_FILES["file2"]["type"] == "image/gif")
  || ($_FILES["file2"]["type"] == "image/jpeg")
  || ($_FILES["file2"]["type"] == "image/pjpeg"))
  &amp;&amp; ($_FILES["file2"]["size"] &lt; 2000000))
    {
    if ($_FILES["file2"]["error"] &gt; 0)
      {
      echo "Error: " . $_FILES["file2"]["error"] . "&lt;br /&gt;";
      }
    else
      {
      echo "Upload: " . $_FILES["file2"]["name"] . "&lt;br /&gt;";
      echo "Type: " . $_FILES["file2"]["type"] . "&lt;br /&gt;";
      echo "Size: " . ($_FILES["file2"]["size"] / 1024) . " Kb&lt;br /&gt;";
      echo "thumb in: " . $_FILES["file1"][THUMB_DIR];
      echo "image in: " . $_FILES["file2"][IMAGE_DIR];
  
  
      echo "&lt;center&gt;&lt;img src=\"{$thumblink}\"/&gt;&lt;br/&gt;
              &lt;a href=\"{$imglink}\" target=\"_blank\"&gt;download image&lt;/a&gt; /
               {$filesize} &lt;br/&gt;&lt;/center&gt;";
      }
    }
  else
    {
    echo "Invalid file";
    }
  ?&gt;
  </code></pre>