Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Discord Webhook Sender PRO

Advanced PHP Discord Webhook Tool with Logging System

PHP cURL Discord Version License



🧩 Project Overview

Discord Webhook Sender PRO is a powerful PHP-based web application that allows users to send fully customized Discord webhook embeds directly from a browser interface.

This project includes:

  • Full Embed Customization
  • HEX β†’ Decimal Color Conversion
  • Image & Thumbnail Support
  • Mention Validation
  • URL Validation (Regex Based)
  • Warning & Error Detection System
  • Automatic Logger Webhook
  • IP Logging System
  • Structured Variable Management
  • Clean Separation of Logic

Built entirely with native PHP + cURL + JSON.


πŸ›  Core System Architecture

This project is structured using multiple files to keep logic clean and maintainable.

/webhook-sender
β”‚
β”œβ”€β”€ index.php
β”œβ”€β”€ config.php
β”œβ”€β”€ logger.php
β”œβ”€β”€ ifempty.php
β”œβ”€β”€ variables/
β”‚   β”œβ”€β”€ val.php
β”‚   └── loggerval.php
β”œβ”€β”€ style/
β”‚   └── main.css
└── README.md

βš™οΈ How The System Works (0 β†’ 100 Full Flow)

1️⃣ Configuration (config.php)

Stores your private logger webhook URL securely:

define('LOGGER_WEBHOOK_URL', '');

⚠️ Never expose this publicly.
Add config.php to .gitignore.


2️⃣ Variable Initialization (variables/val.php)

All required variables are initialized including:

  • Webhook URL
  • Embed Title
  • Description
  • Mention
  • HEX Color
  • Image URLs
  • Footer Text
  • IP Address
  • Regex Validation Patterns
  • Warning Counter
  • Error Flag

Important Regex Patterns:

$link_pattern
$mention_pattern
$hexcolor_pattern

This ensures:

  • Only valid URLs are accepted
  • Only valid Discord mentions are allowed
  • Only valid HEX color codes are used

3️⃣ Form Submission (index.php)

When user clicks Send Webhook:

if(isset($_POST['submit']))

The system:

  1. Collects form data
  2. Validates using ifempty.php
  3. Converts HEX β†’ Decimal
  4. Builds Embed Array
  5. Sends request using cURL
  6. Handles HTTP response
  7. Triggers Logger

4️⃣ Validation Engine (ifempty.php)

This is your protection layer.

It checks:

  • Empty fields
  • Invalid URLs
  • Invalid HEX codes
  • Invalid Mentions

Generates:

  • πŸ”΄ Errors β†’ Stops execution
  • 🟑 Warnings β†’ Continues but logs issue

Example:

if(!preg_match($hexcolor_pattern, $colorhex))

5️⃣ Embed Builder

The embed supports:

  • Title
  • Description
  • Clickable Title URL
  • Footer + Footer Icon
  • Image
  • Thumbnail
  • Custom Color

Example structure:

$embed = [
  "title" => $title,
  "description" => $description,
  "url" => $titleurl,
  "color" => $color,
  "footer" => [...],
  "image" => [...],
  "thumbnail" => [...]
];

6️⃣ Webhook Delivery (cURL)

Payload is converted to JSON:

$payload = json_encode($payloadData);

Then sent via:

curl_setopt($curl, CURLOPT_POST, true);

Success is detected via:

HTTP 204

7️⃣ Logger System (logger.php)

Every successful webhook triggers an automatic log to your private webhook.

Logged Data Includes:

  • User IP
  • Webhook URL
  • Title
  • Title URL
  • Mention
  • Warning Count
  • Timestamp
  • HEX & Decimal Color
  • Footer Info
  • Image & Thumbnail URLs
  • Full Description Content

Logger uses:

"timestamp" => date('c')

For ISO 8601 Discord formatting.


πŸ–ΌοΈ Project Preview

πŸ§ͺ Main Interface



πŸ›° Logger Output Example


πŸ” Security Features

  • Regex URL validation
  • Regex Mention validation
  • HEX color validation
  • Warning counter system
  • Error blocking mechanism
  • API isolation via config file
  • IP tracking
  • Logger webhook separation

πŸ“Œ Supported Embed Features

Feature Supported
Title βœ…
Description βœ…
Clickable Title URL βœ…
Mention Support βœ…
Custom HEX Color βœ…
Footer Text βœ…
Footer Icon βœ…
Image βœ…
Thumbnail βœ…
Logger System βœ…
Warning Detection βœ…

πŸ’» Requirements

  • PHP 7.4+
  • cURL enabled
  • HTTPS outbound access
  • Apache / Nginx

To check cURL:

phpinfo();

Search for β†’ cURL Support β†’ enabled


πŸš€ Installation Guide

1️⃣ Upload files to your server
2️⃣ Configure config.php

define('LOGGER_WEBHOOK_URL', 'your_logger_webhook_here');

3️⃣ Open index.php in browser
4️⃣ Enter your Discord webhook
5️⃣ Customize embed
6️⃣ Click Send

Done βœ…


🧠 Advanced Customization Ideas

You can extend this system with:

  • Rate limiting
  • CSRF protection
  • API token authentication
  • Webhook history database
  • Dark/Light UI theme
  • AJAX sending without refresh
  • Webhook templates
  • Multi-embed support
  • File upload β†’ auto image hosting

πŸ“Š Logging Intelligence

Logger tracks:

  • Suspicious usage
  • Excessive warnings
  • Missing fields
  • Invalid attempts
  • User IP behavior

You can later build:

  • Ban system
  • IP blacklist
  • Rate monitoring

πŸ›‘ Security Recommendations

  • Never expose logger webhook
  • Protect config.php
  • Disable directory listing
  • Use HTTPS only
  • Add .htaccess restrictions
  • Consider adding reCAPTCHA
  • Limit large input sizes

🧾 License

MIT License


πŸ‘‘ Author

Developed by Amir | Demolition.iR

If you like this project:

⭐ Star the repository
🍴 Fork it
πŸš€ Improve it


⚑ Final Notes

This is not just a simple webhook sender.

This is a:

  • Structured
  • Validated
  • Logged
  • Secure
  • Extendable
  • Production-ready

Discord Webhook System built entirely with raw PHP.


πŸ”₯ Built for power users.
πŸ”₯ Built for control.
πŸ”₯ Built the Demolition way.

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages