+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Upload Via Url Script

  1. #1
    Senior Member laro696
    Join Date
    Feb 2007
    Location
    Cape Town, South Africa
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    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 and then in the config file, specify the directory where it must be uploaded to, example

    lol did that make sense?

    think wen.ru's 'upload via url'

  2. #2
    Member Akon
    Join Date
    Mar 2007
    Location
    Belgrade
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    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 and then in the config file, specify the directory where it must be uploaded to, example

    lol did that make sense?

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

  3. #3
    Senior Member khan1
    Join Date
    Mar 2008
    Location
    ---Vashi---New Bombay aka Navi Mumbai---Maharashtra---India
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    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

  4. #4
    Senior Member laro696
    Join Date
    Feb 2007
    Location
    Cape Town, South Africa
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

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

  5. #5
    Senior Member SpiderWap
    Join Date
    Apr 2007
    Location
    Secunda SA
    Posts
    631
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    0

    Default

    I'll quickly write you a script ok


  6. #6
    Senior Member SpiderWap
    Join Date
    Apr 2007
    Location
    Secunda SA
    Posts
    631
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    0

    Default

    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.


  7. The Following User Says Thank You to SpiderWap For This Useful Post:

    Mysterio3 (01-03-10)

  8. #7
    Member min0taur
    Join Date
    Nov 2005
    Location
    Philippines
    Posts
    57
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Default

    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
    <div align="center">



    </div>

  9. The Following User Says Thank You to min0taur For This Useful Post:

    Mysterio3 (01-03-10)

  10. #8
    Senior Member GiLL GiLL's Avatar
    Join Date
    Jun 2006
    Location
    Australia
    Posts
    313
    Thanks
    3
    Thanked 28 Times in 17 Posts
    Blog Entries
    2
    Rep Power
    0

    Default

    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
    Build Own site Free



    Add your site here



    Free downloads


  11. #9
    Senior Member neostar neostar's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    106
    Thanks
    2
    Thanked 20 Times in 6 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by laro696
    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 and then in the config file, specify the directory where it must be uploaded to, example 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
    "We're Just Bound To Exists To Do Anything, But For Rest Of The Things We're Free To Do Everything."
    - Rajendra Pondel



  12. The Following User Says Thank You to neostar For This Useful Post:

    Mysterio3 (01-03-10)

  13. #10
    Member pretend is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    96
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by neostar
    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

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Scripts Index
    By GumSlone in forum Scripts Forum
    Replies: 41
    Last Post: 02-06-10, 21:07
  2. upload and download script
    By hidayath in forum Scripts Forum
    Replies: 7
    Last Post: 17-03-10, 03:13
  3. [web] 65 Most Needed Php Scripts
    By jayasanka in forum Scripts Forum
    Replies: 18
    Last Post: 14-01-10, 12:54
  4. Url Shortening Script
    By kosty in forum Scripts Forum
    Replies: 6
    Last Post: 01-07-08, 23:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO