PHP code example of khromov / wordpress-dot-org-api
1. Go to this page and download the library: Download khromov/wordpress-dot-org-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
khromov / wordpress-dot-org-api example snippets
/* Your Composer autoloader */
$api = new WordPressOrgAPI();
/* Sets content-type to text/plain */
$api->set_headers();
/* Salts */
echo $api->call('secret-key/1.0/');
echo $api->call('secret-key/1.1/salt/');
/* Stats */
echo $api->call('/stats/plugin/1.0/english-wp-admin');
echo $api->call('/stats/plugin/1.0/downloads.php', array('slug' => 'english-wp-admin', 'limit' => '30', 'callback' => 'myFunc'));
/* Version check */
echo $api->call('/core/version-check/1.7/');
/* Plugin info */
echo $api->call('/plugins/info/1.0/english-wp-admin');