<?php defined('BASEPATH') or exit('No direct script access allowed');

class Remotesearch
{

    public function __construct()
    {
        
    }

    public function wikipedia($keyword)
    {
        $result = file_get_contents('https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=' . urlencode($keyword) . '&format=json&uselang=ko');
        return json_decode($result)->query->search;
    }
}
