Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/travisghansen/pfsense_fauxapi_php_client

pfSense PHP API client
https://github.com/travisghansen/pfsense_fauxapi_php_client

api client firewall pfsense php

Last synced: 3 months ago
JSON representation

pfSense PHP API client

Awesome Lists containing this project

README

        

# Introduction
A simple PHP client for leveraging the [pfsense_fauxapi](https://github.com/ndejong/pfsense_fauxapi). See
[pfsense_fauxapi](https://github.com/ndejong/pfsense_fauxapi) for available methods. Review `Client.php` if further
details are needed.

# Sample
```php
'http(s)://host[:port]',
'apiKey' => 'PFFA...',
'apiSecret' => '',
];

$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);

*/

?>

```