1. Go to this page and download the library: Download inani/oxfordapi-wrapper 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/ */
// Make it or pass it as argument
$oxford = app(Inani\OxfordApiWrapper\OxfordWrapper::class);
// look for the translation from a language to an other, returns a parser
$parser =$oxford->lookFor('balablabla')
->from('en')
->to('es')
->translate();
// get array of translations
$translations = $parser->get();
// get array of [example => [translations]]
$examples = $parser->getExamples();
// look for the definitions of a word, returns a parser
$parser =$oxford->lookFor('balablabla')
->define();
// get array of definitions
$definitions = $parser->get();
// look for the examples of a word, returns a parser
$parser =$oxford->lookFor('balablabla')
->examples();
// get array of examples
$definitions = $parser->get();
// You can try all combinations
$res = $oxford->lookFor('happy')
->synonym()
->antonym()
->fetch();
// results will be related to (syno or anto)
// get synonyms and/or antonyms
$res->get();
// get only antonyms or null if not specfied in fetch
$res->antonyms();
//get only synonyms or null if not specfied in fetch
$res->synonyms();
$res = $oxford->lookFor('ace')
->talk();
// get the array of result
$res->get();
// get the link to the audio file of pronunciation
$res->speak();
//get the spelling
$res->spell();
//get the notation
$res->notation();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.