$postData = array( 'service' => 'express', # Sercie Art ('express','standard') 'country' => 'de', # 2 Stellinger Iso Code 'package' => array( 1 => array( 'pice' => 2, #Anzahl der Pakete 'weight' => 5, #Gewicht der Pakets (kg) 'vol' => 4.5, #Volumsgewicht ), 2 => array( 'pice' => 1, #Anzahl der Pakete 'weight' => 5, #Gewicht der Pakets (kg) 'l' => 20, #Abmessungen in cm 'w' => 30, #Abmessungen in cm 'h' => 40, #Abmessungen in cm ), ), 'insurance' => 1, # Versichterung 1 = ja, 0 = Nein (nur Bei service express Möglich ) 'insurance_value' => 123, # Versicherungs Wert. 'insurance_type' => 'product', # Art der Versicherten wahre ('product': Handelswahre,'electronics': Elektronik,'valuables': Gold) ); $username = 57295; $password = @Performance007!; $apiUrl = "https://api.logex.at/"; $endpoint = 'price'; $headers = array( #'Authorization: Basic '. base64_encode($username.':'.$password), 'mail:'. base64_encode($username), 'pw:'. base64_encode($password), ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiUrl . $endpoint); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if(!$response) { echo "Fehler: " . curl_error($ch); } else { $data = json_decode($response, true); } if($data == '') $data['error'] = $response; curl_close($ch); print_r($data); Skip to content

Showing 1–16 of 31 results

Load More

WordPress Cookie Notice by Real Cookie Banner