37 lines
896 B
PHP
37 lines
896 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands\Grapper;
|
|
|
|
use App\Utilities\Notice;
|
|
|
|
class Helper
|
|
{
|
|
/**
|
|
* Create a new class instance.
|
|
*/
|
|
public static function get_auth_string()
|
|
{
|
|
if (Grapper::$options['provider_id'] == 1) {
|
|
// txodds soccer
|
|
Grapper::$auth = 'ident=betaid1&passwd=Dy59vpRC';
|
|
Grapper::$domain = 'https://xml2.txodds.com/';
|
|
} elseif (Grapper::$options['provider_id'] == 3) {
|
|
// txodds others
|
|
Grapper::$auth = 'ident=betaid2&passwd=Dy59vpRC';
|
|
Grapper::$domain = 'https://xml2.txodds.com/';
|
|
} else {
|
|
Notice::note('error txodds provider', 'r', 1);
|
|
}
|
|
}
|
|
|
|
public static function margin($arr, $stellen = 3)
|
|
{
|
|
$r = 0;
|
|
foreach ($arr as $value) {
|
|
$r += 100 / $value;
|
|
}
|
|
|
|
return round($r, $stellen);
|
|
}
|
|
}
|