first commit
This commit is contained in:
16
application/libraries/Remotesearch.php
Executable file
16
application/libraries/Remotesearch.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user