shiftechafrica / net-kodi-php-sdk
Library for NetKodi Api Triggers. Use this to manage your ISP clients and network devices.
Requires
- php: >=8.0
- guzzlehttp/guzzle: ^7.10
This package is auto-updated.
Last update: 2025-10-05 18:44:26 UTC
README
NetKodi - Connect - Bill - Sell - Internet
🚀 Introduction
NetKodi PHP SDK provides a simple and efficient interface for interacting with the NetKodi Networking API — designed for seamless integration with Mikrotik, NAS, and PPPoE servers.
It helps ISPs and network administrators manage and automate network operations through the NetKodi API.
Key Features
- 🔌 Real-time user connection and disconnection
- ⚙️ Automated bandwidth management and speed enforcement
- 🧩 Centralized NAS and access server control
- 👥 Customer authentication and session management
- 🧠 Easy Laravel or standalone PHP integration
📘 Full Documentation: https://docs.netkodi.co.ke
⚙️ Installation
Install via Composer:
composer require shiftechafrica/net-kodi-php-sdk
Update to the latest version:
composer update shiftechafrica/net-kodi-php-sdk --lock
If not auto-discovered, run:
composer dump-autoload
Publish the configuration file:
php artisan vendor:publish --provider="NetKodi\NetKodiServiceProvider"
The config file will be created at:
config/netkodi.php
Add your API token to the .env
file:
NET_KODI_API_TOKEN=your_api_token_here
🧩 Usage
Use the SDK to manage NAS devices, IP pools, bandwidth plans, customers, and subscriptions.
<?php use NetKodi\NetKodi; /** * ---------------------------------------- * NetKodi SDK Usage Examples * ---------------------------------------- * Demonstrates how to interact with the * NetKodi API using CRUD operations. */ /** * NAS TYPES & DEVICES */ return (new NetKodi)->getNasTypes(); return (new NetKodi)->getAllNas(); return (new NetKodi)->createNas([ "nasname" => "192.168.88.109", "type" => "Huawei", "secret" => "secret", "port" => 1812, "description" => "short description" ]); return (new NetKodi)->getNas(12); return (new NetKodi)->deleteNas(12); /** * IP POOLS */ return (new NetKodi)->getPools(); return (new NetKodi)->getPool(12); /** * BANDWIDTH PLANS */ return (new NetKodi)->getPlans(); return (new NetKodi)->createPlan([ "plan" => "700MBS", "download_limit" => 700, "upload_limit" => 700, "static_ip" => false ]); return (new NetKodi)->getPlan(29); /** * CUSTOMERS */ return (new NetKodi)->getCustomers(); return (new NetKodi)->createCustomer([ "plan_id" => 27, "username" => "netkodi", "password" => "password" ]); return (new NetKodi)->getCustomer('netkodi'); /** * SUBSCRIPTIONS */ return (new NetKodi)->getSubscriptions(); return (new NetKodi)->createSubscription([ "username" => "netkodi", "date" => "2025-11-30 23:59:59" ]); return (new NetKodi)->getSubscription('netkodi');
🧭 Version Guidance
Version | Status | Packagist | Namespace | Release |
---|---|---|---|---|
1.x | ✅ Latest | shiftechafrica/net-kodi-php-sdk |
NetKodi\NetKodiServiceProvider |
v1.0.1 |
🛡️ Security Vulnerabilities
If you discover any security vulnerabilities, please contact:
📧 Bugs
📄 License
This package is open-source software licensed under the
MIT License