Ana Sayfa / Kod ve Scriptler / King Monetized URL Shortener

King Monetized URL Shortener

Yerleşik para kazanma özellikli, yayıncıları, reklamverenleri ve yöneticileri destekleyen profesyonel bir PHP-MySQL URL kısaltıcı

  • Yayın tarihi21 Ekim 2025
  • Nerede çalışırPHP 7.4, PHP 8.1, PHP 8.2
  • Paket içeriği.php, .css, .html, .sql, JavaScript .js
  • Son güncelleme17 Kasım 2025
  • Canlı demoVar
King Monetized URL Shortener

Overview

King Monetized URL Shortener

A production-ready PHP–MySQL link shortener with built-in monetization for publishers, a full advertiser console, robust analytics, and multi-domain support. Designed for shared hosting (cPanel/Apache) and easy commercial deployment.

Why You’ll Love It

  • Monetize instantly — interstitial, direct, or frame links with per-link ad controls.
  • Advertiser campaigns — CPM bidding, GEO & device targeting, start/end scheduling.
  • Clean modern UI — Bulma-styled front & admin, mobile-friendly.
  • Actionable analytics — real-time counters + daily rollups, CSV exports, mini charts.
  • Safety first — Google Safe Browsing (v5 client), CSRF/2FA/CAPTCHA, secure sessions.
  • Referrals — built-in program with configurable commission.
  • Gateways — modular deposits (PayPal, Razorpay). Withdrawals with admin review.
  • CMS included — Blog, Help Center, and custom Pages.
  • Installer & Cron — point-and-click setup; daily rollup job for earnings.

Main Features

  • Short links: Interstitial, Direct (tokenized), Frame
  • Per-link ad preferences: banner / HTML-JS / popup / popunder / off
  • Advertiser console: campaigns, creatives, budgets, spend & conversion tracking
  • Publisher dashboard: KPIs, top countries/devices, links manager
  • Reports: monthly chart + CSV, filter by link
  • Multi-domain support with canonical routing
  • Geo/device detection (Cloudflare header → Sypex fallback)
  • Email via SMTP (PHPMailer) and optional 2FA

What’s Inside

  • Frontend: landing, link creator, dashboard, reports, referrals
  • Runtime: r.php (interstitial), go.php (direct), full.php (frame)
  • Advertiser: campaigns, creatives, funding, tracking
  • Admin: settings, branding, users, rates, payouts, blog/help/pages, safebrowsing
  • Cron: daily earnings & stats rollups
  • API: simple endpoint to create short links programmatically

Quick Installation

  1. Upload files to your hosting root (e.g., public_html/).
  2. Create a MySQL database & user with full privileges.
  3. Open /install/ in your browser and follow the wizard.
  4. Delete the /install folder after success.
  5. Log in as admin and configure branding, SMTP, CAPTCHA, GSB key, gateways, and rates.

Daily Cron (Recommended)

Run once per day to aggregate stats and publisher earnings:

<code>php /home/username/public_html/cron/rollup.php
# or web:
wget -q -O- "https://yourdomain.com/cron/rollup.php?key=YOUR_SECRET_KEY"
</code>

Minimum Server Requirements

  • PHP 7.4+ (recommended 8.1/8.2)
  • MySQL 5.7+ or MariaDB 10.2.7+ (JSON support), InnoDB, utf8mb4
  • Apache/Nginx (Apache .htaccess included)
  • Extensions: pdo_mysql, json, mbstring, curl, openssl, session, fileinfo, ctype, iconv, hash
  • /uploads folder writable

Security & Best Practices

  • Use HTTPS and secure cookies.
  • Enable CAPTCHA and Google Safe Browsing enforcement.
  • Keep the cron key secret if using web-based cron.
  • Block script execution in /uploads via .htaccess (included).
  • Enable 2FA for admin accounts.

API (Quick Look)

Create a short URL by calling /api.php with your API token and parameters:

<code>GET /api.php?api=YOUR_TOKEN&url=https://example.com&type=interstitial
</code>

Features

Key Features

Monetization & Links

  • Multiple link modes: Interstitial, Direct (tokenized), and Frame.
  • Per-link ad controls: enable/disable Banner, HTML/JS, Popup/Popunder, or turn ads off.
  • Referral program: configurable commission with auto-issued referral links.
  • Rate management: publisher RPM/CPM baselines with GEO/device overrides.
  • Withdrawal flow: minimum threshold, fees (flat/percent), admin approval.

Advertiser Suite

  • CPM campaigns: bids, floors, pacing with total and daily budgets.
  • Targeting: countries and device types (desktop, mobile, tablet).
  • Creatives: banner and custom HTML/JS; popup/popunder support.
  • Conversion tracking: pixel & server-to-server postback with value.
  • Wallet & funding: deposits via PayPal and Razorpay (modular gateways).

Analytics & Reporting

  • Real-time counters on interstitials and dashboards.
  • Daily rollups: aggregates into user earnings for fast queries.
  • Breakdowns: by country, device, link, campaign, and creative.
  • CSV exports for campaigns and user reports.
  • Mini charts and monthly summaries.

Links, Routing & Domains

  • Short aliases with custom slugs, password, expiry, and max clicks.
  • Direct redirect tokens to bypass interstitial when allowed.
  • Multi-domain support with canonical routing and per-domain uniqueness.
  • Bot filtering and unique click IDs to reduce invalid traffic.

Safety & Security

  • Google Safe Browsing (v5 client) with enforcement mode.
  • Geo detection: Cloudflare header with Sypex/MaxMind fallback.
  • Form security: CSRF tokens, CAPTCHA (hCaptcha / reCAPTCHA v2).
  • Account security: 2FA support, secure sessions, password hashing.
  • Hardened uploads: non-executable /uploads via .htaccess.

Admin & CMS

  • Settings hub: currency, locale, timezone, payout rules, cron key.
  • Branding: logo and favicons with cached helpers.
  • Users & roles: admin, advertiser, publisher; suspend/reactivate.
  • Pages, Help Center, Blog: built-in CMS with image uploads.
  • Announcements for system-wide messages.

Developer & API

  • Installer wizard generates config and schema automatically.
  • Simple REST API to create short links (JSON or text output).
  • Modular gateways (extend via /includes/gateways/ registry).
  • Ad selection engine extensible for new formats and rules.
  • Clean PHP codebase using PDO, prepared statements, and helpers.

Performance & Hosting

  • Shared-hosting friendly: cPanel/Apache ready with .htaccess.
  • Daily cron job for rollups and housekeeping.
  • UTF-8 (utf8mb4) and InnoDB-backed schema.
  • No external dependencies required beyond standard PHP extensions.

Requirements

Server Requirements

King Monetized URL Shortener is lightweight and fully compatible with most shared hosting environments. Below are the minimum requirements to install and run the application smoothly.

  • PHP Version: 7.4 or higher (recommended: 8.1 / 8.2)
  • Web Server: Apache or Nginx (Apache preferred with .htaccess support)
  • Database: MySQL 5.7+ or MariaDB 10.2.7+ (with JSON column support)
  • Storage Engine: InnoDB with UTF8MB4 encoding

Required PHP Extensions

  • pdo_mysql — for database operations
  • json — for API responses and configuration
  • mbstring — for multibyte text handling
  • curl — for external API calls and GSB lookups
  • openssl — for encryption and secure requests
  • session — for login and authentication sessions
  • fileinfo — for uploads and MIME detection
  • ctype, iconv, hash — required by helpers and security modules

Optional Extensions

  • gd or imagick — for image processing (optional)
  • zip — for export/import features

File Permissions

  • /uploads — must be writable (777 or 755 depending on your host)
  • /uploads/blog and /uploads/branding — writable for image uploads
  • /install — writable during installation (can be deleted afterward)

Server Configuration

  • Enable HTTPS for secure redirects and admin access
  • Allow outgoing cURL requests (for GSB, APIs, etc.)
  • PHP memory limit: at least 128M
  • Max upload size: at least 5MB
  • Cron job access (CLI or web with secret key)

Recommended Environment

  • Hosting with cPanel or DirectAdmin
  • PHP 8.1 with OPcache enabled
  • MySQL 8.0+ or MariaDB 10.5+
  • SSL certificate installed

Example Cron Command

<code>php /home/username/public_html/cron/rollup.php
# or via URL:
wget -q -O- "https://yourdomain.com/cron/rollup.php?key=YOUR_SECRET_KEY"
</code>

Once these requirements are met, you can install the script directly through your browser and begin configuring your monetized shortener in minutes.