public function getNewRandomArticle($number = 1)
    {
        $wiki_api = $this->base_api . 'action=query&list=random&rnnamespace=0&rnlimit=' . $number;
        $json_wapi = json_decode(file_get_contents($wiki_api), true);
        $this->article_ids = [];
        foreach ($json_wapi['query']['random'] as $item) {
            $this->article_ids[] = $item['id'];
        }

        return $this->article_ids;
    }
public function getNewRandomArticle($number = 1)
    {
        $wiki_api = $this->base_api . 'action=query&list=random&rnnamespace=0&rnlimit=' . $number;
        $json_wapi = json_decode(file_get_contents($wiki_api), true);
        $this->article_ids = [];
        foreach ($json_wapi['query']['random'] as $item) {
            $this->article_ids[] = $item['id'];
        }

        return $this->article_ids;
    }
public function getNewRandomArticle ( $ number = 1 ) { $ wiki_api = $ this -> base_api . 'action=query&list=random&rnnamespace=0&rnlimit=' . $ number ; $ json_wapi = json_decode ( file_get_contents ( $ wiki_api ) , true ) ; $ this -> article_ids = [ ] ; foreach ( $ json_wapi [ 'query' ] [ 'random' ] as $ item ) { $ this -> article_ids [ ] = $ item [ 'id' ] ; } return $ this -> article_ids ; }
Get a new random article
@param  integer $number
@return array
Get a new random article