title: how to get data from other website?
body: <p>I'm new in programming specially laravel</p>
  
  <p>this is the link that I want to get data from.... 
  this is a sports list </p>
  
  <p>[<a href="http://www.lionpubpattaya.com/index.php/tv-guide][1]" rel="nofollow">http://www.lionpubpattaya.com/index.php/tv-guide][1]</a></p>
  
  <p>I want to display that data in my application and should display like this </p>
  
  <pre><code>JSON
  {
  
  "games":[
  
  {
  
  "gameTitle":"PREMIER LEAGUE FOOTBALL",
  
  "gameList" : {
  
  "0" : "Sat 15 - 1845 SOUTHAMPTON VS EVERTON",
  
  "1" : "Sat 15 - 2100 SUNDERLAND VS NORWICH",
  
  "2" : "Sat 15 - 2100 SWANSEA VS NEWCASTLE",
  
  "3" : "Sat 15 - 2100 TOTTENHAM VS STOKE",
  
  "4" : "Sat 15 - 2100 WATFORD VS WEST BROM",
  
  "5" : "Sat 15 - 2100 WEST HAM VS LEICESTER",
  
  "6" : "Sun 16 - 1930 CRYSTAL PALACE VS ARSENAL"
  
  }
  
  },
  
  {
  
  "gameTitle":"NRL",
  
  "gameList" : {
  
  "0" : "Thurs 13 - 1630 COWBOYS VS RABBITOHS",
  
  "1" : "Fri 14 - 1630 BRONCOS VS DRAGONS",
  
  "2" : "Sat 15 - 1155 WEST TIGERS VS KNIGHTS",
  
  "3" : "Sat 15 - 1425 PANTHERS VS WARRIORS",
  
  "4" : "Sat 15 - 1625 ROOSTERS VS EELS",
  
  "5" : "Sun 16 - 1100 RAIDERS VS SEA EAGLES",
  
  "6" : "Sun 16 - 1300 BULLDOGS VS TITANS",
  
  "7" : "Mon 17 - 1600 SHARKS VS STORM"
  
  }
  
  },
  
  {
  
  "gameTitle":"AFL",
  
  "gameList" : {
  
  "0" : "Fri 14 - 1630 SYDNEY VS COLLINGWOOD",
  
  "1" : "Sat 15 - 1030 ESSENDON VS ADELAIDE",
  
  "2" : "Sat 15 - 1110 KANGAROOS VS ST KILDA",
  
  "3" : "Sat 15 - 1330 PT ADELAIDE VS GW SYDNEY",
  
  "4" : "Sat 15 - 1620 GEELONG VS HAWTHORN",
  
  "5" : "Sat 15 - 1620 BRISBANE VS CARLTON",
  
  "6" : "Sun 16 - 1000 RICHMOND VS GOLD COAST",
  
  "7" : "Sun 16 - 1220 BULLDOGS VS MELBOURNE",
  
  "8" : "Sun 16 - 1330 FREMANTLE VS WEST COAST"
  
  }
  
  }
  
  
  
  
  this is my code in my laravel controller
  
     public function index()
      {
  
         // $file = file_get_contents("excel/sportstv.txt");
         // return $file;
          libxml_use_internal_errors(true);
          $html = file_get_contents("http://www.lionpubpattaya.com/index.php/tv-guide");
  
          $dom = new \DOMDocument();
          $dom-&gt;loadHTML($html);
          $nodes = $dom-&gt;document.getElementById('&lt;h3&gt;');
          $result = array();
          foreach ($nodes as $node) {
              $result = $node-&gt;nodeValue; // return &lt;h3&gt; tag data
          } 
          $response = response()-&gt;json(array("Title",$result));
  
          return $response;
          libxml_use_internal_errors(true);
      }
  </code></pre>