45) { echo $ht1 . ':' . $ht2 . ' | '; } elseif ($status == 'ft') { echo $ht1 . ':' . $ht2 . ' | '; }}function half($status, $timer, $ht1, $ht2, $ft1, $ft2) { if ($status == 'live' && $timer < 46) { echo $ht1 . ':' . $ht2; } elseif ($status == 'live' && $timer > 45) { echo $ft1 . ':' . $ft2; } elseif ($status == 'ht') { echo $ht1 . ':' . $ht2; } elseif ($status == 'wait') { echo '-:-'; } elseif ($status == 'ft') { echo $ft1 . ':' . $ft2; } elseif ($status) { echo 'p:p'; } else { echo '-:-'; }}function endMatch($con, $conUwin) { $now = time(); $ko_minus24 = $now - 21600; //ko minus 24hrs $query = mysqli_query($con, "SELECT * FROM `results` WHERE ko + 6300 < $now and status != 'ft' and `status` != 'pst' or event LIKE '%18 mins%' and ko + 780 < $now and status != 'ft' and `status` != 'pst' or event LIKE '%36 mins%' and ko + 1860 < $now and status != 'ft' and `status` != 'pst' or event LIKE '%50 mins%' and ko + 2700 < $now and status != 'ft' and `status` != 'pst' or event LIKE '%60 mins%' and ko + 3300 < $now and status != 'ft' and `status` != 'pst' or event LIKE '%70 mins%' and ko + 3900 < $now and status != 'ft' and `status` != 'pst' or event LIKE '%80 mins%' and ko + 4500 < $now and status != 'ft' and `status` != 'pst' order by ko asc") or die(mysqli_error($con)); while ($query_result = mysqli_fetch_array($query)) { $status = $query_result['status']; $dft1 = $query_result['ft1']; $dft2 = $query_result['ft2']; $dko = $query_result['ko']; echo $id = $query_result['id'];//query uwin id with api id $queryUwin = mysqli_query($conUwin, "SELECT `id` FROM `match` WHERE `live_id` = '$id' ") or die(mysqli_error($conUwin)); $query_resultUwin = mysqli_fetch_array($queryUwin); if (isset($query_resultUwin['id']) && $query_resultUwin['id'] > 0) { $uwinId = $query_resultUwin['id']; } else { $uwinId = 'none'; }//api call for match details $url = 'http://api.betsapi.com/v1/event/view?token=967-Q2OvosZviWCw1s&event_id=' . $id; $output = file_get_contents($url);//Decode the JSON and convert it into an array. $jsonDecoded = json_decode($output, true); $row = $jsonDecoded; if (!empty($row)) {//get match attributes from api $time_status = $row['results'][0]['time_status']; echo '
'; if ($time_status === '3') { $new_state = 'ft'; $ht1 = $row['results'][0]['scores'][1]['home']; $ht2 = $row['results'][0]['scores'][1]['away']; $ft1 = $row['results'][0]['scores'][2]['home']; $ft2 = $row['results'][0]['scores'][2]['away']; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$new_state' "; $values[] = '(' . $id . ', ' . $score . ' )'; //uwin id if non existent dont add if ($uwinId !== 'none') {//uwin values to be used $valuesUwin[] = '(' . $uwinId . ', ' . $score . ' )'; } } elseif ($time_status === '2' && $dft1 !== '?' && $dft2 !== '?') { $new_state = 'ft'; $ht1 = $row['results'][0]['scores'][1]['home']; $ht2 = $row['results'][0]['scores'][1]['away']; $ft1 = $row['results'][0]['scores'][2]['home']; $ft2 = $row['results'][0]['scores'][2]['away']; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$new_state' "; $values[] = '(' . $id . ', ' . $score . ' )'; //uwin id if non existent dont add if ($uwinId !== 'none') {//uwin values to be used $valuesUwin[] = '(' . $uwinId . ', ' . $score . ' )'; } } elseif ($time_status === '4' && $dko < $ko_minus24 || $time_status === '5' && $dko < $ko_minus24) { //if time status = 2 postpone game $new_state = 'pst';//if uwin game new state == ft if ($uwinId !== 'none') { $new_state = 'ft'; } $ht1 = 'p'; $ht2 = 'p'; $ft1 = 'p'; $ft2 = 'p'; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$new_state' "; $values[] = '(' . $id . ', ' . $score . ' )'; //uwin id if non existent dont add if ($uwinId !== 'none') {//uwin values to be used $valuesUwin[] = '(' . $uwinId . ', ' . $score . ' )';//set pst state to bet db for ticket payment minus game mysqli_query($conUwin, "UPDATE `bet` SET ft1 = '$ft1', `ft2` = '$ft2' WHERE `match` ='$uwinId' ") or die(mysqli_error($conUwin)); } } elseif ($time_status === '7') { $new_state = 'wait'; $ht1 = $row['results'][0]['scores'][1]['home']; $ht2 = $row['results'][0]['scores'][1]['away']; $ft1 = $row['results'][0]['scores'][2]['home']; $ft2 = $row['results'][0]['scores'][2]['away']; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$new_state' "; $values[] = '(' . $id . ', ' . $score . ' )'; //uwin id if non existent dont add if ($uwinId !== 'none') {//uwin values to be used $valuesUwin[] = '(' . $uwinId . ', ' . $score . ' )'; } } elseif ($time_status === '8') { $new_state = 'abn';//if uwin game new state == ft if ($uwinId !== 'none') { $new_state = 'ft'; } $ht1 = $row['results'][0]['scores'][1]['home']; $ht2 = $row['results'][0]['scores'][1]['away']; $ft1 = $row['results'][0]['scores'][2]['home']; $ft2 = $row['results'][0]['scores'][2]['away']; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$new_state' "; $values[] = '(' . $id . ', ' . $score . ' )'; //uwin id if non existent dont add if ($uwinId !== 'none') {//uwin values to be used $valuesUwin[] = '(' . $uwinId . ', ' . $score . ' )'; } } elseif ($status == 'wait' && $dko < $ko_minus24 || $status == 'live' && $dko < $ko_minus24 || $status == 'ht' && $dko < $ko_minus24) { //if time status = 2 postpone game $new_state = 'pst';//if uwin game new state == ft if ($uwinId !== 'none') { $new_state = 'ft'; } $ht1 = 'p'; $ht2 = 'p'; $ft1 = 'p'; $ft2 = 'p'; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$new_state' "; $values[] = '(' . $id . ', ' . $score . ' )'; //uwin id if non existent dont add if ($uwinId !== 'none') {//uwin values to be used $valuesUwin[] = '(' . $uwinId . ', ' . $score . ' )';//set pst state to bet db for ticket payment minus game mysqli_query($conUwin, "UPDATE `bet` SET ft1 = '$ft1', `ft2` = '$ft2' WHERE `match` ='$uwinId' ") or die(mysqli_error($conUwin)); } } } } if (isset($values)) { $value = trim(implode(',', $values));//value uwin implode $valueUwin = trim(implode(',', $valuesUwin)); $sql = "INSERT INTO `results` (`id`, `ht1`, `ht2`, `ft1`, `ft2`, `status`)VALUES" . $value . "ON DUPLICATE KEY UPDATE`id`=VALUES(`id`), `ht1`=VALUES(`ht1`), `ht2`=VALUES(`ht2`), `ft1`=VALUES(`ft1`), `ft2`=VALUES(`ft2`), `status`=VALUES(`status`) "; mysqli_query($con, $sql) or die(mysqli_error($con));//uwin update on duplicate $sqlUwin = "INSERT INTO `match` (`id`, `ht1`, `ht2`, `ft1`, `ft2`, `status`)VALUES" . $valueUwin . "ON DUPLICATE KEY UPDATE`id`=VALUES(`id`), `ht1`=VALUES(`ht1`), `ht2`=VALUES(`ht2`), `ft1`=VALUES(`ft1`), `ft2`=VALUES(`ft2`), `status`=VALUES(`status`) "; mysqli_query($conUwin, $sqlUwin) or die(mysqli_error($conUwin)); }}function live($con, $conUwin) { global $now, $now_12;//query match db for live game $query = mysqli_query($con, "SELECT * FROM `results` where ko < $now and status != 'ft' order by ko ASC ") or die(mysqli_error($con)); while ($result = mysqli_fetch_array($query)) { echo '
'; $dbKo = $result['ko']; echo $live_id = $result['id'];//api call for match details $url = 'https://v3.football.api-sports.io/fixtures?id=' . $live_id; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'x-rapidapi-key: abc3fd54b6d2fca1d7b789abb6c700b5', 'x-rapidapi-host: v3.football.api-sports.io' ), )); $response = curl_exec($curl); curl_close($curl); $gameRow = json_decode($response, true); $value = $gameRow['response']; //print_r($value); echo '
'; echo '
'; echo '
'; if (isset($value[0]['fixture']['timestamp'])) { echo $ko = $value[0]['fixture']['timestamp']; } else { $ko = $dbKo; } echo '
'; echo $time_status = $value[0]['fixture']['status']['short']; $timer = $value[0]['fixture']['status']['elapsed']; echo '
'; if ($time_status === 'FT' || $time_status === 'AET' || $time_status === 'PEN') { $status = 'ft'; $ht1 = $value[0]['score']['halftime']['home']; $ht2 = $value[0]['score']['halftime']['away']; $ft1 = $value[0]['score']['fulltime']['home']; $ft2 = $value[0]['score']['fulltime']['away']; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$status' "; $values[] = '(' . $live_id . ', ' . $ko . ', ' . $timer . ', ' . $score . ' )'; } elseif ($dbKo < $now_12 || $time_status === 'PST' || $time_status === 'AWD') { $status = 'ft'; $timer = '0'; $ht1 = 'p'; $ht2 = 'p'; $ft1 = 'p'; $ft2 = 'p'; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$status' "; $values[] = '(' . $live_id . ', ' . $ko . ', ' . $timer . ', ' . $score . ' )'; } elseif ($time_status === 'NS') { $status = 'wait'; $timer = '0'; $ht1 = '?'; $ht2 = '?'; $ft1 = '?'; $ft2 = '?'; $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$status' "; $values[] = '(' . $live_id . ', ' . $ko . ', ' . $timer . ', ' . $score . ' )'; } else { $status = 'live'; if (isset($value[0]['score']['halftime']['home'])) { $ht1 = $value[0]['score']['halftime']['home']; } else { $ht1 = '?'; } if (isset($value[0]['score']['halftime']['away'])) { $ht2 = $value[0]['score']['halftime']['away']; } else { $ht2 = '?'; } if (isset($value[0]['goals']['home'])) { $ft1 = $value[0]['goals']['home']; } else { $ft1 = '?'; } if (isset($value[0]['goals']['away'])) { $ft2 = $value[0]['goals']['away']; } else { $ft2 = '?'; } if (empty($timer)) { $timer = 0; } $score = " '$ht1', '$ht2', '$ft1', '$ft2', '$status' "; $values[] = '(' . $live_id . ', ' . $ko . ', ' . $timer . ', ' . $score . ' )'; } }//lets insert else update db at once for half one if (isset($values)) { $value = trim(implode(',', $values)); print_r($value); $sql = "INSERT INTO `results` (`id`, `ko`, `timer`, `ht1`, `ht2`, `ft1`, `ft2`, `status`)VALUES" . $value . "ON DUPLICATE KEY UPDATE`ko`=VALUES(`ko`), `timer`=VALUES(`timer`), `ht1`=VALUES(`ht1`), `ht2`=VALUES(`ht2`), `ft1`=VALUES(`ft1`), `ft2`=VALUES(`ft2`), `status`=VALUES(`status`) "; mysqli_query($con, $sql) or die(mysqli_error($con)); } unset($values); unset($value);}function simulate($length, $con) { $now = time();//func simulates virtual games results as per simulation id//start work entering results feed as simulated $query1 = mysqli_query($con, "SELECT * FROM `results` WHERE `status` = 'live' and `ko` < '$now' and event like '%" . $length . " mins%' ") or die(mysqli_error($con)); while ($result1 = mysqli_fetch_array($query1)) { if (isset($result1['id'])) { $id = $result1['id']; $timer = $result1['timer'] + 1; $simulationId = $result1['simulation_id']; $ht1 = $result1['ht1']; $ht2 = $result1['ht2']; $ft1 = $result1['ft1']; $ft2 = $result1['ft2']; echo $id . '
'; $subQuery = mysqli_query($con, "SELECT * FROM `simulated_games` WHERE `id` = '$simulationId' ") or die(mysqli_error($con)); $subResult = mysqli_fetch_array($subQuery); if ($timer <= $length / 2) { //if score = ? assign score as 0 if ($ht1 === '?' && $ht2 === '?') { $ht1 = 0; $ht2 = 0; } $ht1New = $ht1 + $subResult['h' . $timer]; $ht2New = $ht2 + $subResult['a' . $timer]; $subQuery1 = "UPDATE `results` SET `ht1` = '$ht1New', `ht2` = '$ht2New', `timer` = '$timer' WHERE `id` = '$id'"; mysqli_query($con, $subQuery1) or die(mysqli_error($con)); } else { //if score = ? assign score as ht score if ($ft1 === '?' && $ft2 === '?') { $ft1 = $ht1; $ft2 = $ht2; } //add goal from simulated game row to ft $ft1New = $ft1 + $subResult['h' . $timer]; $ft2New = $ft2 + $subResult['a' . $timer]; $subQuery1 = "UPDATE `results` SET `ft1` = '$ft1New', `ft2` = '$ft2New', `timer` = '$timer' WHERE `id` = '$id'"; mysqli_query($con, $subQuery1) or die(mysqli_error($con)); } //if game length reached end game mark ft if ($timer >= $length) { $subQuery2 = "UPDATE `results` SET `status` = 'ft' WHERE `id` = '$id'"; mysqli_query($con, $subQuery2) or die(mysqli_error($con)); } } }}function getGames($length, $time, $con) { $query = mysqli_query($con, "SELECT * FROM `results` WHERE `ko` = '$time' and event LIKE 'Esoccer%' and event LIKE '%" . $length . " mins%' ") or die(mysqli_error($con)); while ($result = mysqli_fetch_array($query)) { $id = $result['id']; $event_id = $result['event_id']; $event = $result['event']; $ko = $result['ko']; $timeStatus = '1'; $timer = 0; $status = 'live'; $ht1 = 0; $ht2 = 0; $simulationId = $result['simulation_id']; if (strpos($event, $length . " mins") > 1) { $res = array("1", "x", "2", "x", "1", "2", "2", "1", "x", "x", "2", "1", "1", "2", "x", "2", "x", "1"); shuffle($res); //shuffle selections for random pick $newPred = $res[0]; //assign first as selected pick if ($newPred === "x") { //create arrays with game lengths for use when inserting games $query2 = mysqli_query($con, "SELECT `id` FROM `simulated_games` WHERE `ft1` = `ft2` and `length` = '$length' order by RAND() limit 1 ") or die(mysqli_error($con)); $result2 = mysqli_fetch_array($query2); $simulation_id = $result2['id']; } elseif ($newPred === "2") { //create arrays with game lengths for use when inserting games $query2 = mysqli_query($con, "SELECT `id` FROM `simulated_games` WHERE `ft2` > `ft1` and `length` = '$length' order by RAND() limit 1 ") or die(mysqli_error($con)); $result2 = mysqli_fetch_array($query2); $simulation_id = $result2['id']; } elseif ($newPred === "1") { //create arrays with game lengths for use when inserting games $query2 = mysqli_query($con, "SELECT `id` FROM `simulated_games` WHERE `ft1` > `ft2` and `length` = '$length' order by RAND() limit 1 ") or die(mysqli_error($con)); $result2 = mysqli_fetch_array($query2); $simulation_id = $result2['id']; } } if ($simulationId > 0) { $sql1 = "UPDATE `results` set `time_status` = '$timeStatus', `status` = '$status', `ht1` = '0', `ht2` = '0' where `id` = '$id' "; mysqli_query($con, $sql1) or die(mysqli_error($con)); } else { $sql1 = "UPDATE `results` set `time_status` = '$timeStatus', `status` = '$status', `ht1` = '0', `ht2` = '0', `simulation_id` = '$simulation_id' where `id` = '$id' "; mysqli_query($con, $sql1) or die(mysqli_error($con)); } echo $id . ' - ' . $simulation_id . ' changed
'; }}
function getCountryFlag($event) {
$flags = array(
'England' => "\xF0\x9F\x8F\xB4\xF3\xA0\x81\xA7\xF3\xA0\x81\xA2\xF3\xA0\x81\xA5\xF3\xA0\x81\xAE\xF3\xA0\x81\xA7\xF3\xA0\x81\xBF",
'Spain' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xB8",
'Germany' => "\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA",
'Italy' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xB9",
'France' => "\xF0\x9F\x87\xAB\xF0\x9F\x87\xB7",
'Brazil' => "\xF0\x9F\x87\xA7\xF0\x9F\x87\xB7",
'Argentina' => "\xF0\x9F\x87\xA6\xF0\x9F\x87\xB7",
'Portugal' => "\xF0\x9F\x87\xB5\xF0\x9F\x87\xB9",
'Netherlands' => "\xF0\x9F\x87\xB3\xF0\x9F\x87\xB1",
'Belgium' => "\xF0\x9F\x87\xA7\xF0\x9F\x87\xAA",
'Turkey' => "\xF0\x9F\x87\xB9\xF0\x9F\x87\xB7",
'Scotland' => "\xF0\x9F\x8F\xB4\xF3\xA0\x81\xA7\xF3\xA0\x81\xA2\xF3\xA0\x81\xB3\xF3\xA0\x81\xA3\xF3\xA0\x81\xB4\xF3\xA0\x81\xBF",
'Wales' => "\xF0\x9F\x8F\xB4\xF3\xA0\x81\xA7\xF3\xA0\x81\xA2\xF3\xA0\x81\xB7\xF3\xA0\x81\xAC\xF3\xA0\x81\xB3\xF3\xA0\x81\xBF",
'USA' => "\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8",
'Mexico' => "\xF0\x9F\x87\xB2\xF0\x9F\x87\xBD",
'Japan' => "\xF0\x9F\x87\xAF\xF0\x9F\x87\xB5",
'South' => "\xF0\x9F\x87\xBF\xF0\x9F\x87\xA6",
'Australia' => "\xF0\x9F\x87\xA6\xF0\x9F\x87\xBA",
'Russia' => "\xF0\x9F\x87\xB7\xF0\x9F\x87\xBA",
'Poland' => "\xF0\x9F\x87\xB5\xF0\x9F\x87\xB1",
'Sweden' => "\xF0\x9F\x87\xB8\xF0\x9F\x87\xAA",
'Norway' => "\xF0\x9F\x87\xB3\xF0\x9F\x87\xB4",
'Denmark' => "\xF0\x9F\x87\xA9\xF0\x9F\x87\xB0",
'Finland' => "\xF0\x9F\x87\xAB\xF0\x9F\x87\xAE",
'Austria' => "\xF0\x9F\x87\xA6\xF0\x9F\x87\xB9",
'Switzerland' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xAD",
'Greece' => "\xF0\x9F\x87\xAC\xF0\x9F\x87\xB7",
'Czech' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xBF",
'Croatia' => "\xF0\x9F\x87\xAD\xF0\x9F\x87\xB7",
'Serbia' => "\xF0\x9F\x87\xB7\xF0\x9F\x87\xB8",
'Romania' => "\xF0\x9F\x87\xB7\xF0\x9F\x87\xB4",
'Ukraine' => "\xF0\x9F\x87\xBA\xF0\x9F\x87\xA6",
'Hungary' => "\xF0\x9F\x87\xAD\xF0\x9F\x87\xBA",
'Bulgaria' => "\xF0\x9F\x87\xA7\xF0\x9F\x87\xAC",
'Ireland' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xAA",
'China' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xB3",
'Korea' => "\xF0\x9F\x87\xB0\xF0\x9F\x87\xB7",
'Colombia' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xB4",
'Chile' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xB1",
'Peru' => "\xF0\x9F\x87\xB5\xF0\x9F\x87\xAA",
'Ecuador' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xA8",
'Paraguay' => "\xF0\x9F\x87\xB5\xF0\x9F\x87\xBE",
'Uruguay' => "\xF0\x9F\x87\xBA\xF0\x9F\x87\xBE",
'Egypt' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xAC",
'Nigeria' => "\xF0\x9F\x87\xB3\xF0\x9F\x87\xAC",
'Kenya' => "\xF0\x9F\x87\xB0\xF0\x9F\x87\xAA",
'Uganda' => "\xF0\x9F\x87\xBA\xF0\x9F\x87\xAC",
'Ghana' => "\xF0\x9F\x87\xAC\xF0\x9F\x87\xAD",
'Tanzania' => "\xF0\x9F\x87\xB9\xF0\x9F\x87\xBF",
'Ethiopia' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xB9",
'Morocco' => "\xF0\x9F\x87\xB2\xF0\x9F\x87\xA6",
'Tunisia' => "\xF0\x9F\x87\xB9\xF0\x9F\x87\xB3",
'Algeria' => "\xF0\x9F\x87\xA9\xF0\x9F\x87\xBF",
'Cameroon' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xB2",
'Senegal' => "\xF0\x9F\x87\xB8\xF0\x9F\x87\xB3",
'India' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xB3",
'Saudi' => "\xF0\x9F\x87\xB8\xF0\x9F\x87\xA6",
'Israel' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xB1",
'Iran' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xB7",
'Iceland' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xB8",
'Slovakia' => "\xF0\x9F\x87\xB8\xF0\x9F\x87\xB0",
'Slovenia' => "\xF0\x9F\x87\xB8\xF0\x9F\x87\xAE",
'Bosnia' => "\xF0\x9F\x87\xA7\xF0\x9F\x87\xA6",
'Albania' => "\xF0\x9F\x87\xA6\xF0\x9F\x87\xB1",
'Montenegro' => "\xF0\x9F\x87\xB2\xF0\x9F\x87\xAA",
'Cyprus' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xBE",
'Malta' => "\xF0\x9F\x87\xB2\xF0\x9F\x87\xB9",
'Luxembourg' => "\xF0\x9F\x87\xB1\xF0\x9F\x87\xBA",
'Lithuania' => "\xF0\x9F\x87\xB1\xF0\x9F\x87\xB9",
'Latvia' => "\xF0\x9F\x87\xB1\xF0\x9F\x87\xBB",
'Estonia' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xAA",
'Georgia' => "\xF0\x9F\x87\xAC\xF0\x9F\x87\xAA",
'Armenia' => "\xF0\x9F\x87\xA6\xF0\x9F\x87\xB2",
'Azerbaijan' => "\xF0\x9F\x87\xA6\xF0\x9F\x87\xBF",
'Belarus' => "\xF0\x9F\x87\xA7\xF0\x9F\x87\xBE",
'Moldova' => "\xF0\x9F\x87\xB2\xF0\x9F\x87\xA9",
'Costa' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xB7",
'Honduras' => "\xF0\x9F\x87\xAD\xF0\x9F\x87\xB3",
'Panama' => "\xF0\x9F\x87\xB5\xF0\x9F\x87\xA6",
'Jamaica' => "\xF0\x9F\x87\xAF\xF0\x9F\x87\xB2",
'Venezuela' => "\xF0\x9F\x87\xBB\xF0\x9F\x87\xAA",
'Bolivia' => "\xF0\x9F\x87\xA7\xF0\x9F\x87\xB4",
'Thailand' => "\xF0\x9F\x87\xB9\xF0\x9F\x87\xAD",
'Vietnam' => "\xF0\x9F\x87\xBB\xF0\x9F\x87\xB3",
'Indonesia' => "\xF0\x9F\x87\xAE\xF0\x9F\x87\xA9",
'Malaysia' => "\xF0\x9F\x87\xB2\xF0\x9F\x87\xBE",
'Philippines' => "\xF0\x9F\x87\xB5\xF0\x9F\x87\xAD",
'New' => "\xF0\x9F\x87\xB3\xF0\x9F\x87\xBF",
'Canada' => "\xF0\x9F\x87\xA8\xF0\x9F\x87\xA6",
'UEFA' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xBA",
'Champions' => "\xE2\xAD\x90",
'Europa' => "\xF0\x9F\x87\xAA\xF0\x9F\x87\xBA",
'World' => "\xF0\x9F\x8C\x8D",
'Africa' => "\xF0\x9F\x8C\x8D",
'African' => "\xF0\x9F\x8C\x8D",
'Asia' => "\xF0\x9F\x8C\x8F",
'Asian' => "\xF0\x9F\x8C\x8F",
'Copa' => "\xF0\x9F\x8C\x8E",
'International' => "\xF0\x9F\x8C\x8D",
'Friendly' => "\xF0\x9F\xA4\x9D",
);
//extract first word from event name to match country
$firstWord = explode(' ', trim($event))[0];
if (isset($flags[$firstWord])) {
return $flags[$firstWord];
}
//fallback: soccer ball emoji
return "\xE2\x9A\xBD";
}
Fatal error: Uncaught Error: Call to undefined function UserIp() in /var/www/livesoccer.ug/public_html/online_users.php:7
Stack trace:
#0 /var/www/livesoccer.ug/public_html/config.php(26): include()
#1 /var/www/livesoccer.ug/public_html/header.php(2): require_once('...')
#2 /var/www/livesoccer.ug/public_html/gameinfo.php(20): require_once('...')
#3 {main}
thrown in /var/www/livesoccer.ug/public_html/online_users.php on line 7