From: Felipe Fuentealba
Date: Thu, 4 Jun 2020 15:01:08 -0400

I am on:

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

But I also need to run the link as:

megatools dl

All the links I am trying to grab from mega, are from different users
and I only get from them:


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

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";
    echo "WOOT! success download...\n";

Felipe Fuentealba