travisghansen / pfsense_fauxapi_php_client
support pfSense API interaction with pfsense_fauxapi
Installs: 2 116
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 4
Forks: 1
Open Issues: 1
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-12-22 13:34:23 UTC
README
A simple PHP client for leveraging the pfsense_fauxapi. See
pfsense_fauxapi for available methods. Review Client.php
if further
details are needed.
Sample
<?php require_once('vendor/autoload.php'); $options = [ 'uri' => 'http(s)://host[:port]', 'apiKey' => 'PFFA...', 'apiSecret' => '<secret>', ]; $client = new PfSenseFauxApi\Client($options); $response = $client->config_get(); var_dump($response); $response = $client->config_backup_list(); var_dump($response); //$response = $client->config_reload(); //var_dump($response); //$response = $client->gateway_status(); //var_dump($response); //$response = $client->rule_get(); //var_dump($response); /* $data [ "system" => [ "dnsserver" => [ "8.8.8.8", "8.8.4.4" ], "hostname" => "newhostname" ] ]; $response = $client->config_patch($data); var_dump($response); $data = [ 'function' => 'openbgpd_install_conf' ]; $response = $client->function_call($data); var_dump($response); */ ?>