Upload Via Url Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Upload Via Url Script

    lol i feel like an idiot coz im the only one posting topics in this forum!
    anyway, i'm setting up a new download site, and wanna transfer all my files from my old host to the new one. nut i dont feel like uploading it all again.
    so what im looking for is a script where i can put in the file location, example http://myoldsite.com/file.zip and then in the config file, specify the directory where it must be uploaded to, example http://mynewsite.com/downloads

    lol did that make sense?

    think wen.ru's 'upload via url'

    #2
    lol i feel like an idiot coz im the only one posting topics in this forum!
    anyway, i'm setting up a new download site, and wanna transfer all my files from my old host to the new one. nut i dont feel like uploading it all again.
    so what im looking for is a script where i can put in the file location, example http://myoldsite.com/file.zip and then in the config file, specify the directory where it must be uploaded to, example http://mynewsite.com/downloads

    lol did that make sense?

    think wen.ru's 'upload via url'[/b]
    use the copy(); function..

    Comment


      #3
      use net2ftp.com
      just download nd upload n2ftp script to your server
      nd change size limit in 2ftp script
      or if script size is not big
      use net2ftp.com
      to transfer files from 1st server to 2nd server

      Comment


        #4
        use the copy(); function..[/b]
        any1 care to explain how this works?

        Comment


          #5
          I'll quickly write you a script ok

          Click here!!!

          Comment


            #6
            Code:
            copy("http://old.com/files.zip, http://new.com");
            Sorry man, something came up, cant do a script right now, but heres the code to copy..

            Hope you figure something out.

            Click here!!!

            Comment


              #7
              Will make it easy to understand for the author

              1. Make a folder in your server name it UPLOADS.
              2. CHMOD or Change Permission to 777.
              3. Create upload.php and paste the code below

              Code:
              <?php
              $file = $_POST["file"];
              if(isset($file)){
              $fname= array_reverse(explode("/",$file));
              if(copy($file,"UPLOADS/$fname[0]"){
              echo "$fname[0] Succesfully Uploaded!";
              }else{
              echo "Error Uploading $fname[0]!";
              }
              }
              ?>
              <form action="upload.php" method="post">
              <input name="file">
              <input type="submit" value="upload">
              </form>
              Let me know if theres an error i just do the code posting here LoL

              Comment


                #8
                Code:
                <?
                $file="http://youroldsite.com/filename.zip";
                
                $fname= array_reverse(explode("/",$file));
                if(copy("$file", "folder/$fname[0]")) echo "$file copyed
                ";
                ?>


                make a php file and where is folder change it with your folder/dir name
                left wap stuff

                Comment


                  #9
                  Originally posted by laro696 View Post
                  lol i feel like an idiot coz im the only one posting topics in this forum!
                  anyway, i&#39;m setting up a new download site, and wanna transfer all my files from my old host to the new one. nut i dont feel like uploading it all again.
                  so what im looking for is a script where i can put in the file location, example http://myoldsite.com/file.zip and then in the config file, specify the directory where it must be uploaded to, example http://mynewsite.com/downloads lol did that make sense?

                  think wen.ru&#39;s &#39;upload via url&#39;


                  ok here is what i think u want:

                  Code:
                  <?php
                  $PHP_SELF = $_SERVER['PHP_SELF'];
                  
                  if ($_GET[xfer]) {
                  if ($_POST[from] == "") {
                  print "You forgot to enter a url.";
                  } else {
                  copy("$_POST[from]", "$_POST[to]");
                  $size = round((filesize($_POST[to])/1000000), 3);
                  print "transfer complete.<br>
                  <a><a href=\"$_POST[from]\">$_POST[from]</a><br>
                  <a><a href=\"$_POST[to]\">$_POST[to]</a> : $size MB";
                  }
                  } else {
                  print "<form action=\"$PHP_SELF?xfer=true\" method=post>
                  from(http://): <input name='from' value=''><br>
                  to(filename): <input name='to'><br>
                  <input type=submit value=\"transload\">";
                  }
                  ?>
                  hope this will help u

                  - Rajenra Pondel

                  Comment


                    #10
                    Originally posted by neostar View Post
                    ok here is what i think u want:

                    Code:
                    <?php
                    $PHP_SELF = $_SERVER['PHP_SELF'];
                    
                    if ($_GET[xfer]) {
                    if ($_POST[from] == "") {
                    print "You forgot to enter a url.";
                    } else {
                    copy("$_POST[from]", "$_POST[to]");
                    $size = round((filesize($_POST[to])/1000000), 3);
                    print "transfer complete.<br>
                    <a><a href=\"$_POST[from]\">$_POST[from]</a><br>
                    <a><a href=\"$_POST[to]\">$_POST[to]</a> : $size MB";
                    }
                    } else {
                    print "<form action=\"$PHP_SELF?xfer=true\" method=post>
                    from(http://): <input name='from' value=''><br>
                    to(filename): <input name='to'><br>
                    <input type=submit value=\"transload\">";
                    }
                    ?>
                    hope this will help u

                    - Rajenra Pondel


                    HOW DOES THIS WORK I MEAN How to get the file after upload after upload it shows the file name and the location but i am bit confused on this i need to setup a path and get the uploaded file to the desired path how? help thanks
                    Nice Effects

                    Comment


                      #11
                      But this script doesn't download force files. Like the name of file is with space and % and special characterstic then it doesn't transfer..
                      This is my new community for wap coding. Come and join and experience real wap coding
                      http://leonine.6te.net

                      Comment


                        #12
                        <?php
                        $file = $_POST["file"];
                        if(isset($file)){
                        $fname= array_reverse(explode("/",$file));
                        if(copy($file,"UPLOADS/$fname[0]"){
                        echo "$fname[0] Succesfully Uploaded!";
                        }else{
                        echo "Error Uploading $fname[0]!";
                        }
                        }
                        ?>
                        <form action="upload.php" method="post">
                        <input name="file">
                        <input type="submit" value="upload">
                        </form>
                        Hey THANX for this script,
                        I've use it on my 4m. (mybb forum)

                        But I faced a problem
                        After filling a download link & giving file name(with & without extention) i click transload,
                        but my file is not getting uploaded on my forum,
                        it shows error>>
                        "The specified thread does not exist."

                        what to do man??
                        plz help me.

                        Comment


                          #13
                          hey plz help me.......anyone plzzzzzzzzz

                          Comment


                            #14
                            Please help in that script to get the filesize and filetype because I'm using it in filesharing site. Thanks

                            Comment


                              #15
                              Originally posted by anthrax68 View Post
                              Please help in that script to get the filesize and filetype because I'm using it in filesharing site. Thanks
                              filesharing site does not allow url upload

                              Comment

                              Working...
                              X