Skip to content
pfSense PHP API client
Branch: master
Clone or download
Latest commit db3b01d Sep 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/PfSenseFauxApi initial commit Sep 4, 2018
.gitignore initial commit Sep 4, 2018
LICENSE
README.md
composer.json

README.md

Introduction

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

*/

?>
You can’t perform that action at this time.