zond80 / mega-downloader Goto Github PK
View Code? Open in Web Editor NEWPHP script to download files and folders from mega.nz
License: GNU General Public License v3.0
PHP script to download files and folders from mega.nz
License: GNU General Public License v3.0
i have an account which allows me go past the 5gb limits. Is it possible to add a login option to the existing code?
It would be possible to add this functionality? To pause and resume the download?
Hi my friend.
If I tried to download big files (I am trying with a file of 1.3Gb) the file didn't download complety, when I saw the file it has about 300 to 500Mb.
Maybe if it possible to add partials download it can be fixed (as some gestor like JDownloader).
Not sure if we can do the partials download.
Thanks =).
hi i wanted to ask if this code still works?
Getting HTTP/1.1 509 Bandwidth Limit Exceeded
Hi my friend.
I check a possible issue, if you enter an URL that is into a folder it has something like this:
https://mega.nz/#F!8ll3lb6R!ErrnqjmvDc1I9CsrJIkExQ!xt9WiT5S
In the function mega_get_folder_info the preg_match separe the string by:
$id = 8ll3lb6R
$key = ErrnqjmvDc1I9CsrJIkExQ!xt9WiT5S
And the correct key is ErrnqjmvDc1I9CsrJIkExQ whitout the last part that represent the folder.
At the moment (not the best solution) y remove the !xt9WiT5S with:
preg_match('/!(.?)!(.)/', $hash, $matches);
$id = $matches[1];
$key = $matches[2];
$pos = strpos($key,'!');
if($pos) $key = substr($key,0,$pos);
But maybe can be another solution because if the upper folder has more files them it going to give all.
See you =).
hi sir i was able to make resume support with mega files. But it's not completely done. The problem is the download manager shows resume capabiltiy . But if i stop and start it again, the resume start from 0. I hope you can help me little bit with this problem
Hi sir i wanted to implement this code with mine. But i would like to know that streaming download using your code will give me resume or not.
Hi @ZonD80 , I think your mega.class.php has some bugs.
I noticed that it will output undefined message when I execute the example_file.php
PHP Notice: Undefined variable: buffer in /home/webserver/mega-downloader/src/mega.class.php on line 203
PHP Notice: Undefined variable: buffer in /home/webserver/mega-downloader/src/mega.class.php on line 206
Please fix it.
Hi @ZonD80 , thank you for providing the project.
When I tried to run this PHP program, it's not worked.
It always output error message.
Notice: Undefined offset: 4 in C:\Users\lee\Desktop\mega-downloader\src\mega.class.php on line 266
Call Stack:
0.0003 233088 1. {main}() C:\Users\lee\Desktop\mega-downloader\example_folder.php:0
0.0024 403256 2. MEGA->__construct() C:\Users\lee\Desktop\mega-downloader\example_folder.php:6
0.0027 403536 3. MEGA->mega_get_folder_info() C:\Users\lee\Desktop\mega-downloader\src\mega.class.php:22
Notice: Undefined offset: 5 in C:\Users\lee\Desktop\mega-downloader\src\mega.class.php on line 266
Call Stack:
0.0003 233088 1. {main}() C:\Users\lee\Desktop\mega-downloader\example_folder.php:0
0.0024 403256 2. MEGA->__construct() C:\Users\lee\Desktop\mega-downloader\example_folder.php:6
0.0027 403536 3. MEGA->mega_get_folder_info() C:\Users\lee\Desktop\mega-downloader\src\mega.class.php:22
Notice: Undefined offset: 6 in C:\Users\lee\Desktop\mega-downloader\src\mega.class.php on line 266
Call Stack:
0.0003 233088 1. {main}() C:\Users\lee\Desktop\mega-downloader\example_folder.php:0
0.0024 403256 2. MEGA->__construct() C:\Users\lee\Desktop\mega-downloader\example_folder.php:6
0.0027 403536 3. MEGA->mega_get_folder_info() C:\Users\lee\Desktop\mega-downloader\src\mega.class.php:22
Notice: Undefined offset: 7 in C:\Users\lee\Desktop\mega-downloader\src\mega.class.php on line 266
Call Stack:
0.0003 233088 1. {main}() C:\Users\lee\Desktop\mega-downloader\example_folder.php:0
0.0024 403256 2. MEGA->__construct() C:\Users\lee\Desktop\mega-downloader\example_folder.php:6
0.0027 403536 3. MEGA->mega_get_folder_info() C:\Users\lee\Desktop\mega-downloader\src\mega.class.php:22
No such folder on mega. Maybe it was deleted.
It is possible to fix it ? Thanks.
Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/mega/src/mega.class.php on line 5
Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.:/Applications/MAMP/bin/php/php5.6.10/lib/php') in /Applications/MAMP/htdocs/mega/src/mega.class.php on line 5
how to fix ?
ob_clean(): failed to delete buffer. No buffer to delete in
mega.class.php on line 204
it is not work
can't dll more than 700 mo
Hello @ZonD80 , do you know how can I download folders , With your class ?
Here is an example folder i want to download
https://mega.nz/#F!7sUWDarI!PlPZJyGBfk9SCLMdHCt_4g
It's not support resumable capability. Can you work on it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.