Good morning, I need to know if there is a possibility of doing fgetcsv()
using temporary of a .csv
file coming from a url.
The reason you try to do this is because Chrome does not overwrite any saved files.
You could do the following:
I already use php to extract data from a file saved on the server;
But in this case you would have to replace the filename with $url
$url = "http://servidor.com/filtros/%5AD%7A/da:14-02-2017+00%3A00..../output:csv";
if (($base = fopen("arquivo.csv", "r")) !== FALSE) {
while (($data = fgetcsv($base, 0, ";")) !== FALSE) {
$data = array_map("utf8_encode", $data);
//resultado da extração
}
}else{
//retorno do else
}