Welcome Guest, Not a member yet? Register   Sign In
How rewite this
#1

(This post was last modified: 12-26-2024, 08:27 AM by motoroller.)

$file = @fopen($localFilePath, 'w');
                $ch = curl_init($FileDetails['href']);
                curl_setopt($ch, CURLOPT_FILE, $file);
                curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: OAuth ']);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                curl_setopt($ch, CURLOPT_HEADER, false);
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
                fwrite($file, curl_exec($ch));
                curl_close($ch);
                fclose($file);


how can i rewite this with  Services::curlrequest

i have a lot custum options is it possible or not?

And one more question how send CURLOPT_RETURNTRANSFER to true when i get quest via curlrequest i have headers

And i get image and insede body included headers, how can i remove it?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB