PHP code example of ammarfaizi2 / brainly

1. Go to this page and download the library: Download ammarfaizi2/brainly 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/ */

    

ammarfaizi2 / brainly example snippets




rainly\Brainly;

$query = "siapa penemu lampu?";
$st = new Brainly($query);
$result = $st->exec();

if (count($result) === 0) {
  print "Not found!\n";
} else {
  print json_encode($result, JSON_PRETTY_PRINT);
}