Subject:
From: Felipe Fuentealba
Date: Thu, 4 Jun 2020 15:01:08 -0400
Hello,
I am on: megatools-1.11.0-git-20200503-win64.zip
I will be running the linux version once my php code is done and I get
a web host for my project, I am not using any API / require DIR .
'../vendor/autoload.php'; composer crap
I am running the command from the .php file:
megatools dl https://mega.nz/folder/Dp01CbzL#YOFIxqF72TUN-xtYJrh3bA/file/OoFShSZC
But I also need to run the link as:
megatools dl https://mega.nz/folder/Dp01CbzL#YOFIxqF72TUN-xtYJrh3bA/file/FF7REMAKE_Menu.iro
All the links I am trying to grab from mega, are from different users
and I only get from them:
#F!Dp01CbzL!YOFIxqF72TUN-xtYJrh3bA,jxtCwCzY,FF7REMAKE_Menu.iro
Then my php takes that info and build the link that megatools requires
Anyway to accomplish this?
I have to basically code on my script to try the file ID first, if not
found to try the actual file name, cause the database where the files
are, seems to be a mess, and the application that reads that database
originally, is not failing to download the selected file to the users
computers.
My website will provide a mirror of all those mega files, so when the
daily bandwidth is reached on mega, they can download from my website.
Is pretty bad that some users upload the file without the extension,
so I will have to read the header of the file and rename it to have
the right extension, my php script does that.
Also is there any good way to read the errors on php from the command
megaools dl ? as:
if( !$command ) {
echo "Doh! failed to download from mega\n";
}
else{
echo "WOOT! success download...\n";
}
Sincerely,
Felipe Fuentealba