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

@@ -4,38 +4,33 @@ namespace App\Console\Commands\Grapper\Logifuture;
class Auth
{
public static $pass = 'nuhodds';
public static $password;
public static function exe()
{
$base_url = BaseUrl::get();
$base_url = BaseUrl::get();
$url = $base_url.'/v1/authentication/token';
$data = Loader::curlLoader($url, [
'header' => [
'accept: application/json',
'content-type: application/json',
],
'post' => [
'username' => 'nuhodds',
'password' => self::$pass,
],
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://proxydb1.nuhodds.com/proxy.php');
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'url' => $url,
'password' => self::$password,
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Proxy-Auth: AIkcoRnipSgMK88WMQhOQQN3LKDrNDCIebNfPnEayJdmDeTigx',
]);
if (! is_array($data)) {
$file = curl_exec($ch);
Notice::note('no data sleep(60)', 'r');
sleep(60);
$data = json_decode($file, true);
return false;
}
$header = $data;
$header[] = 'Authorization: Bearer '.$data['token'];
$header[] = 'accept: application/json';
$header[] = 'content-type: application/json';
return $header;
return $data;
}
}
@@ -3,6 +3,7 @@
namespace App\Console\Commands\Grapper\Logifuture;
use App\Console\Commands\Nuh;
use App\Console\Commands\Grapper\Logifuture\Auth;
class BaseUrl
{
@@ -13,17 +14,21 @@ class BaseUrl
switch (Nuh::$options['provider_id']) {
case 5:
if ($test) {
Auth::$password = 'nuhodds';
$base_url = 'https://stg-external-api.bet9ja.com/external';
} else {
Auth::$password = 'uSwIqs!Y3eHrNbyH';
$base_url = 'https://external-api.bet9ja.com/external';
}
break;
case 6:
if ($test) {
Auth::$password = 'nuhodds';
$base_url = 'https://stg-external-api.yajuego.co/external';
} else {
$base_url = 'https://external-api.yajuego.co/external';
Auth::$password = 'uSwIqs!Y3eHrNbyH';
}
break;
}
@@ -25,8 +25,6 @@ class Fixtures
$sportmap = Sport::map('logi', 1, [1, 3]);
dd($sportmap);
self::$elements = LoadElements::load(Nuh::$options['provider_id']);
self::$groups = LoadGroups::load(Nuh::$options['provider_id']);