fork(3) download
  1. <?php
  2. $url = 'https://m...content-available-to-author-only...o.nz/#!4090kJrY!LZiZBgsOo_Gg1sLnykZLHsUThAC9oaPRG3---0gD92Y';
  3. $array_url = parse_url($url);
  4. print_r($array_url);
  5. echo parse_url($url, PHP_URL_HOST) . "\n"; //pega o HOST
  6. echo $array_url['host'] . "\n"; //aqui pega só o HOST também.
  7. $dominio = explode(".", parse_url($url, PHP_URL_HOST));
  8. echo $dominio[0];
  9. ?>
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
    Array
(
    [scheme] => https
    [host] => mega.co.nz
    [path] => /
    [fragment] => !4090kJrY!LZiZBgsOo_Gg1sLnykZLHsUThAC9oaPRG3---0gD92Y
)
mega.co.nz
mega.co.nz
mega