Notes

PHP

Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.

PHP REST API Tutorial: Build a JSON API Without a Framework
Coding tips

PHP REST API Tutorial: Build a JSON API Without a Framework

A complete JSON REST API in plain PHP 8.4: front controller, router, PDO and SQLite, validation with 422 errors, Bearer token auth and CORS. Every request tested, with real responses.

October 6, 2026 · 29 min read · 123 views

Simple Math Captcha in PHP With Sessions
Coding tips

Simple Math Captcha in PHP With Sessions

A simple PHP math captcha in two functions: store the answer in the session, check it once with ctype_digit and ===, then add a honeypot and time check.

October 2, 2026 · 8 min read · 38 views

PHP Contact Form With mail(), No PHPMailer Needed
Coding tips

PHP Contact Form With mail(), No PHPMailer Needed

How I send contact form emails with PHP's built-in mail(): a fixed recipient, Reply-To, header injection checks, a UTF-8 subject and a fake sendmail.

October 2, 2026 · 9 min read · 139 views

PHP Form Validation and Sanitization Guide
Coding tips

PHP Form Validation and Sanitization Guide

How to validate and sanitize PHP form input: trim, filter_var, mb_strlen and allow-lists, then escape output with htmlspecialchars, add CSRF and redirect.

October 2, 2026 · 11 min read · 220 views

0%