phillipsnick/pfsense-wol

0.0.1 2013-10-10 17:37 UTC

This package is not auto-updated.

Last update: 2024-09-23 15:25:16 UTC


README

Introduction

PHP library for calling pfSense's 2.1 WOL function using CURL.

My internal network makes use of multiple VLANs, there was no simply solution to get WOL working across multiple VLANs so decided to put this script together.

Installation

Using Composer (recommended)

Add the following to your composer.json file

{
    "require": {
        "phillipsnick/pfsense-wol": "dev-master"
    }
}

Then run composer install

Using Git submodules

git submodule add https://github.com/phillipsnick/pfsense-wol.git 

Usage

$service = new \Pfsensewol\Wol(array(
    'https' =>      true,
    'pfsense' =>    'pfsense.hostname',
    'username' =>   'pfSenseUsername',
    'password' =>   'pfSensePassword'
));

$service->send('MacAddress', 'opt4');

Or see example inside Examples/SingleHost.php

Notes

This has only been tested using pfSense 2.1, included are the necessary checks to work with the CSRF protection.

Feel free to help improve this!