Welcome Guest, Not a member yet? Register   Sign In
Read file to another server
#1

HI , i want read file from another server , the file are xls and  i want read with phpspreadsheet ,  i try to use curl :

Code:
        $client = \Config\Services::curlrequest([
            'baseURI' => 'https://myserver/',
        ]);

        // GET file
        $client->get('480060_08_06_2022.xls');

        $code  = $this->response->getStatusCode(); 
        $reason = $this->response->getReason(); 

but i have always $code equals to 200 and $reason equal to ok i f file doesn't exist too.

How can i check if file exist and read or download ?
Reply


Messages In This Thread
Read file to another server - by pippuccio76 - 03-25-2024, 06:12 PM
RE: Read file to another server - by kenjis - 03-25-2024, 06:35 PM
RE: Read file to another server - by pippuccio76 - 03-26-2024, 12:33 AM
RE: Read file to another server - by pippuccio76 - 03-26-2024, 05:24 AM
RE: Read file to another server - by kenjis - 03-26-2024, 05:07 PM
RE: Read file to another server - by pippuccio76 - 03-27-2024, 12:25 AM
RE: Read file to another server - by kenjis - 03-27-2024, 01:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB