Download the PHP package webkernelai/php-sdk without Composer
On this page you can find all versions of the php package webkernelai/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webkernelai/php-sdk
More information about webkernelai/php-sdk
Files in webkernelai/php-sdk
Package php-sdk
Short Description Official WebKernelAI PHP SDK for application security, WAF filtering, HMAC request signing, security headers, and SEO telemetry.
License MIT
Informations about the package php-sdk
WebKernelAI PHP SDK
Official PHP SDK for WebKernelAI โ the next-generation enterprise infrastructure for Technical SEO Intelligence, Zero-Trust Application Security, and Answer Engine Optimization (AEO / GEO).
This SDK provides real-time Web Application Firewall (WAF) filtering, cryptographic HMAC-SHA256 request verification, automated security headers injection, and real-time telemetry synchronization with first-class support for Laravel, CodeIgniter, Symfony, and Core PHP.
๐ Generating Your Cryptographic Pairing Secret & Site ID
To securely connect your PHP application to the WebKernelAI Cloud without database dependencies, you need a high-entropy WEBKERNELAI_PAIRING_SECRET and WEBKERNELAI_SITE_ID.
๐ Generate Secure Pairing Secret Online
- Visit https://webkernelai.com/php-sdk.
- Enter your domain (e.g.,
example.comoryourdomain.com). - Click "Generate 256-Bit Pairing Secret".
- The studio uses a cryptographically secure pseudorandom number generator (256-bit CSPRNG) to generate a collision-resistant
wk_sec_...secret and uniquewk_...site identifier. - Copy your credentials into your
.envor application config.
๐ Enterprise Cryptographic Guarantee: WebKernelAI signatures use standard HMAC-SHA256 message authentication with timestamp freshness validation (300-second replay attack protection window) and constant-time
hash_equals()comparisons to prevent timing and replay exploits.
๐ Key Features
- ๐ก๏ธ Embedded WAF (Web Application Firewall): Automatically inspects incoming
GET,POST, andCOOKIEparameters to block SQL injection (UNION / Blind SQLi), Cross-Site Scripting (XSS), Path Traversal (LFI/RFI directory climbing), and Remote Command Injection (RCE). - ๐ Deep Heuristic File Malware Scanner: Inspects PHP files line-by-line for
eval(base64_decode()),eval(gzinflate()), direct superglobal command backdoors, and webshell footprints (c99,r57,WSO,b374k). - ๐ค Japanese SEO Keyword Spam & Cloaker Defense: Identifies user-agent bot checks (
googlebot,bingbot) coupled with remote fetching scripts trying to inject hidden spam and roguesitemap.xmlfiles. - ๐ก๏ธ Zero-Delete & Multi-Domain Safe: Operates in non-destructive inspect mode, safeguarding shared hosting environments, subdomains, and addon CMS directories (
wp-config.php,artisan,composer.json,application/). - ๐ UploadGuard Engine: Validates uploaded files, stripping null-bytes, intercepting double extensions (
.php.png), and inspecting raw file content for embedded<?phpmagic tags. - โฑ๏ธ Rate Limiter & Bot Throttling: Sliding-window token bucket algorithm that mitigates brute-force attacks and bot scrapers with proxy-aware IP resolution.
- ๐ Cryptographic HMAC-SHA256 Signing: Protects communication between your application and WebKernelAI Cloud with CSPRNG nonces and strict 300-second replay attack protection.
- โก Zero-Latency In-Memory & File Caching: High-performance local cache manager with automated TTL expiration to keep server memory consumption under 2MB.
- ๐ Automated Security Headers: Injects production-grade HTTP security headers (
Content-Security-Policy,Strict-Transport-Security,X-Frame-Options,X-Content-Type-Options,Referrer-Policy,Permissions-Policy). - ๐ SEO & Live Threat Telemetry: Synchronize structured JSON-LD schemas, dynamic robots.txt rules, and stream security alerts with line snippets and SHA-256 hashes directly to your WebKernelAI dashboard.
- ๐ Native Framework Adapters: Drop-in middleware and service providers for Laravel (9, 10, 11+), CodeIgniter (3 & 4), Symfony, and Core PHP.
๐ฆ Requirements
- PHP 7.4, 8.0, 8.1, 8.2, or 8.3+
ext-json,ext-hash,ext-curl(standard in modern PHP distributions)
๐ฅ Installation
Install via Composer:
Or download and require the standalone autoloader:
โก Quick Start
1. Core PHP / Custom Application
2. Laravel Integration (Laravel 9, 10, 11+)
The SDK includes automated service discovery for modern Laravel applications.
-
Add your credentials to your
.envfile (generated from webkernelai.com/php-sdk): - Register the security middleware in
app/Http/Kernel.php(orbootstrap/app.phpfor Laravel 11):
3. CodeIgniter 3 & 4 Integration
CodeIgniter 3:
-
In
application/config/config.php: - In
application/config/hooks.php:
CodeIgniter 4:
Add your credentials in .env:
And register the filter in app/Config/Filters.php:
๐ Cryptographic Request Signing (HMAC-SHA256)
For secure remote command execution, telemetry reporting, and webhook verification:
โ๏ธ Configuration Reference
| Key | Environment Variable | Default | Description |
|---|---|---|---|
site_id |
WEBKERNELAI_SITE_ID |
'' |
Registered Site ID from webkernelai.com/php-sdk. |
pairing_secret |
WEBKERNELAI_PAIRING_SECRET |
'' |
256-bit CSPRNG cryptographic secret key. |
api_url |
WEBKERNELAI_API_URL |
https://api.webkernelai.com |
WebKernelAI API base endpoint. |
enable_waf |
WEBKERNELAI_ENABLE_WAF |
true |
Enable real-time SQLi, XSS, and RCE filtering. |
enable_headers |
WEBKERNELAI_ENABLE_HEADERS |
true |
Enable automated CSP, HSTS, and X-Frame headers. |
timeout |
WEBKERNELAI_TIMEOUT |
10 |
HTTP request timeout in seconds. |
cache_dir |
WEBKERNELAI_CACHE_DIR |
System Temp | Directory for caching telemetry & security policies. |
๐ WebKernelAI Cloud Ecosystem
The PHP SDK seamlessly communicates with the WebKernelAI Command Center:
- Centralized Telemetry: Track blocked attacks, brute-force attempts, and WAF triggers in real time.
- Automated Security Hardening: Generate Content Security Policies (CSP), HSTS headers, and indexation controls from the cloud.
- Deep Technical SEO: Audit sitemaps, Core Web Vitals, and Answer Engine Optimization (AEO) visibility across ChatGPT, Perplexity, and Claude.
๐งช Testing
Run the automated test suite:
๐ค Contributing
Contributions, bug reports, and pull requests are welcome! Feel free to open an issue on the GitHub Issues page.
๐ License
This SDK is open-source software licensed under the MIT License.
Built with โค๏ธ by the WebKernelAI Infrastructure Team.