DPDBeNeLux / DPD-Shipping-for-Prestashop-1.7

Let op: er zijn nieuwe DPD plugins (BETA versie) beschikbaar met belangrijke nieuwe functionaliteiten. De oude plugins zullen na Brexit niet meer goed functioneren, download daarom de nieuwe versie op Github/DPDconnect.
GNU General Public License v3.0
1 stars 2 forks source link

Replace file_get_contents by cUrl #4

Open dumanhaydar opened 6 years ago

dumanhaydar commented 6 years ago

I replace file_get_contents with cUrl

dumanhaydar commented 6 years ago

$wsdl = file_get_contents($url ); with

            $ch = curl_init();
            $timeout = 5;
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
            $wsdl = curl_exec($ch);
            curl_close($ch);

in classes\DpdClient.php

$source = file_get_contents($url); with

        $ch = curl_init();
        $timeout = 5;
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        $source = curl_exec($ch);
        curl_close($ch);