[Mediawiki-api] The best way to call the API from a php script
Michał
holek.n at gmail.com
Sun May 10 20:52:32 UTC 2009
2009/5/10 Rezuan Asrah <rezuan7 at gmail.com>:
> I prefer to use cURL, but how do you use that properly?
> Do you mean the "curl" from the command line, or the equivalent PHP function
> that acts like it?
>
> Run the commad using "exec" function?
ehh... these are, like, basics of the API ;)
if ($api = @file_get_contents('http://en.wikipedia.org/w/api.php?action=query&format=php&titles=Abraham_Lincoln|Film|Language'))
{
$api_result = unserialize($api);
print_r($api_result);
}
--
Michał "Hołek" Połtyn
More information about the Mediawiki-api
mailing list