I want to take data from the site, but I get the following error: Could not connect to host
What is the problem ? How do I solve this problem? Please help me
Code is:
<?php
try {
ini_set("auto_detect_line_endings", true);
ini_set("soap.wsdl_cache_enabled", "0");
$opts = array(
'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer'=>false, 'verify_peer_name'=>false)
);
// SOAP 1.2 client
$params = array ('encoding' => 'UTF-8', 'verifypeer' => false, 'verifyhost' => false, 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1, "connection_timeout" => 180, 'stream_context' => stream_context_create($opts) );
$client = new SoapClient ( "https://dbs.epdk.org.tr/EPDKPetrolWS/EPDKPetrol.asmx?WSDL", $params );
$paramsfunc = array( 'Tarih' => '01/01/2016');
$result = $client->PetrolPiyasasiEnYuksekHacimliSekizFirmaninAkaryakitFiyatlari($paramsfunc)->PetrolPiyasasiEnYuksekHacimliSekizFirmaninAkaryakitFiyatlariResult;
echo "hello";
echo "<pre>";
// Sonucu ekrana bas
var_dump($result);
echo "</pre>";
} catch (Exception $exc) { // Hata olusursa yakala
echo "Soap Hatasi Olustu: " . $exc->getMessage();
}
?>