Skip to content

Instantly share code, notes, and snippets.

@muddy-28
Last active October 15, 2019 18:42
Show Gist options
  • Save muddy-28/c2c3ea058cb457e7ea3fb39796da99b5 to your computer and use it in GitHub Desktop.
Save muddy-28/c2c3ea058cb457e7ea3fb39796da99b5 to your computer and use it in GitHub Desktop.

Revisions

  1. muddy-28 revised this gist Oct 15, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions index.php
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    <html>
    <head>
    <title>How to transfer large files from one server to another in seconds - Nazmul Ahsan</title>
    <title>How to transfer large files from one server to another in seconds - EagaleSolutions</title>
    </head>
    <body>
    <form method="post">
    <input name="url"size="50" placeholder="http://socialchatter.pk/Muqas.zip" />
    <input name="url"size="50" placeholder="http://abc.pk/Muqas.zip" />
    <input name="submit" type="submit" />
    </form>
    <?php
  2. muddy-28 revised this gist Jan 12, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.php
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    <html>
    <head>
    <title>How to transfer large files from one server to another in seconds - Adnan Shafique</title>
    <title>How to transfer large files from one server to another in seconds - Nazmul Ahsan</title>
    </head>
    <body>
    <form method="post">
  3. muddy-28 revised this gist Jan 12, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.php
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    </head>
    <body>
    <form method="post">
    <input name="url"size="50" />
    <input name="url"size="50" placeholder="http://socialchatter.pk/Muqas.zip" />
    <input name="submit" type="submit" />
    </form>
    <?php
  4. muddy-28 created this gist Jan 12, 2018.
    32 changes: 32 additions & 0 deletions index.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    <html>
    <head>
    <title>How to transfer large files from one server to another in seconds - Adnan Shafique</title>
    </head>
    <body>
    <form method="post">
    <input name="url"size="50" />
    <input name="submit" type="submit" />
    </form>
    <?php
    set_time_limit (24 * 60 * 60);
    if (!isset($_POST['submit'])) die();
    // $destination_folder = 'download/';
    $url = $_POST['url'];
    $newFile = basename($url);
    $file = fopen ($url, "rb");
    if ($file) {
    $newf = fopen ($newFile, "wb");
    if ($newf)
    while(!feof($file)) {
    fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
    }
    }
    if ($file) {
    fclose($file);
    }
    if ($newf) {
    fclose($newf);
    }
    ?>
    </body>
    </html>