si ma già facendo un normalissimo

$testo = file_get_content('http://usernameassword@dominio.tlp/path/to/file.txt');

ottiene lo stesso risultato