$sportid) { $post_fields = [ 'url' => BaseUrl::get().'/v1/matches?sportId='.$client_sportid, 'header' => json_encode(['Authorization: Bearer '.$data['token'], 'accept: application/json', 'content-type: application/json']), ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://proxydb1.nuhodds.com/logifuture.php'); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Proxy-Auth: AIkcoRnipSgMK88WMQhOQQN3LKDrNDCIebNfPnEayJdmDeTigx', ]); $file = curl_exec($ch); dd($file); $data = json_decode($file, true); dd($data); } } } $header = []; $header[] = 'Authorization: Bearer '.$data['token']; $header[] = 'accept: application/json'; $header[] = 'content-type: application/json'; return $header;