Jump to content

[SOLVED] Download and upload to my site


Recommended Posts

I have many files hosted at www.hotfile.com. I want to have a form on my site where I input the hotfile.com download links, and then once submit is clicked the files from www.hotfile.com are uploaded to my site.


PS: The reason I want to do is, I dont want the download links to be dead, and I can't be downloading the files to my computer since, I have a slow connection, uploading the files to my site will make sure thiers never a dead link.


Hotfile download links look like this:




If I break the hotfile.com download url down;


This always stays the same:



This always changes:



This is the filename (always changes):



This is the file format (download links can only be .rar.html or .zip.html):



Im guessing this would be done by cURL and the FTP format: [ftp=ftp://user:pass@ftp.mysite.com]ftp://user:pass@ftp.mysite.com[/ftp]


Can anyone give me some help, so I can work in to the code.


Thanks alot.


Link to comment
Share on other sites

Heres an update:


chmod 777 folder: files, input the download urls in the $urls array and the files will be stored in /files.


However the trouble is it aint storing the file/rar, its downloading the html of the download page, bypassing the awaiting limit is the issue.  :-\





$mh = curl_multi_init();
foreach ($urls as $i => $url) {
        $fp[$i]=fopen ($g, "w");
        curl_setopt ($conn[$i], CURLOPT_FILE, $fp[$i]);
        curl_setopt ($conn[$i], CURLOPT_HEADER ,0);
        curl_multi_add_handle ($mh,$conn[$i]);
do {
while ($active);
foreach ($urls as $i => $url) {
    fclose ($fp[$i]);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.