So, what is in $data? Maybe it is not an URL but something else?
Try to print it to see what it contains.
In reply to Re: Recover Excel datas by Corion in thread Recover Excel datas by Perlchaoui