Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2.    
  3.     $api = file_get_contents('https://api.betsapi.com/v1/bet365/result?token=5590-GV2STwo78vd0I1&event_id=76065865');
  4.     $json = json_decode($api);
  5.     $results = $json->results[0];
  6.  
  7.     // Vamos ler os scores
  8.     foreach($results->scores as $key => $value) {
  9.         $key = $key;
  10.         $home = $value->home;
  11.         $away = $value->away;
  12.  
  13.         echo "Key: {$key} - Home: {$home} - Away: {$away}";
  14.         echo "<br><br>";
  15.     }
  16.  
  17.     echo "hello";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement