Esempio n. 1
0
 public function getEvents($sport_id, $tournir_id, $tournir_url)
 {
     $xml = parent::getEvents($sport_id, $tournir_id, $tournir_url);
     $tournir_node = $xml->addChild('Events');
     $file_name = $this->league_path . $tournir_id;
     $url = $this->host . "/engine.php?act=co&co={$tournir_id}";
     $referer = $this->host . (string) $this->sport_node['Url'];
     $html = download_or_load($this->debug, $file_name . ".html", $url, "GET", $referer);
     $this->extract_bets($tournir_node, $html, (string) $this->sport_node['Sign'], $tournir_id);
     if ($this->debug) {
         file_put_contents($file_name . ".xml", $xml->asXML());
     }
     return $xml;
 }
Esempio n. 2
0
 public function getEvents($sport_id, $tournir_id, $tournir_url)
 {
     $xml = parent::getEvents($sport_id, $tournir_id, $tournir_url);
     $tournir_node = $xml->addChild('Events');
     $file_name = $this->league_path . $tournir_id;
     $rnd = rand(1000000000, 2000000000);
     $url = $this->host . "/bets/bets2.php?rnd={$rnd}";
     $referer = $this->host . (string) $this->sport_node['Url'];
     $post_hash['time'] = 1;
     $post_hash['gcheck'] = 9;
     $post_hash['line_id[]'] = $tournir_id;
     $html = download_or_load($this->debug, $file_name . ".html", $url, "POST", $referer, $post_hash);
     $this->extract_events($tournir_node, win1251_to_utf8($html), (string) $this->sport_node['Sign'], $tournir_id);
     if ($this->debug) {
         file_put_contents($file_name . ".xml", $xml->asXML());
     }
     return $xml;
 }