logifuture with proxy wip

This commit is contained in:
salam committed 2026-01-05 16:23:14 +01:00
1 parent a96abae35a
commit 2e57e49f08
19 files changed
+196 -77

No files matched your search

+30 -9
View File
@@ -13,12 +13,9 @@ class Logifuture
public static function switch()
{
$debug = Nuh::$options['d'] ?? 0;
$proxy = Nuh::$options['p'] ?? 0;
$sportmap = Sport::map('logi', 1, [1, 2, 3, 5]);
dd($sportmap);
if ($debug) {
Notice::note(Nuh::$options['provider']['name'].' '.Nuh::$options['sport']['name'], 'g');
}
@@ -32,18 +29,42 @@ class Logifuture
break;
}
$base_url = BaseUrl::get();
$header = Auth::exe();
$data = Auth::exe();
foreach ($sportmap as $client_sportid => $sportid) {
$url = $base_url.'/v1/matches?sportId='.$client_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']),
];
$data = Loader::curlLoader($url, ['curl_options' => $header]);
$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;