i have to download a file created from a php script.
i tried this:
fopen('www.example.com/download.php?key=value', 'rb');
but i stille get a “failed to open stream” error.
how can i do that? If I browse to the url i get the file without problems…
EDIT: sorry, i forgot a piece of the string 🙂
I see multiple issues with you request:
You need to specify the open mode. In your case only'r'applies because you only want to read.phpinfo()and look ifallow_url_fopenis set toOn.fcloseif you decide to usefopen.Example:
You should also read about fopen in the Manual.