1. Go to this page and download the library: Download matthillman/swgoh-help 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/ */
matthillman / swgoh-help example snippets
return [
# ... all the other config blocks
'swgoh_help' => [
'user' => env('SWGOH_HELP_USER'),
'password' => env('SWGOH_HELP_PASSWORD'),
],
];
// Retrieve all mods for a user
$mods = swgoh()->getMods('552325555');
$parser = new SwoghHelp\Parsers\ProfileParser('552325555');
$parser->scrape();
# The user data
$parser->getUser();
# The updated date
$parser->updated();
$parser = new SwoghHelp\Parsers\ModsParser('552325555');
$parser->scrape();
# The mod data
$parser->getMods();
$parser = new SwoghHelp\Parsers\GuildParser('3577');
$parser->scrape(function($member_data) {
# Do something with the member data
});
# The guild data (minus the roster key if you provided a callback)
$parser->data;
# Guild name
$parser->name();
# Guild GP
$parser->gp();
# Guild roster (if you did not provide a callback, if you did this is null)
$parser->members();
# Guild's swogh.gg url
$parser->url();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.