Menu

1 / 2

I Built a Free Social Media Video Downloader in PHP — Here's How It Works

DEV Community: tutorial·Tamil Status Music·5 months ago
#ixm3xWem
Reading 0:00
15s threshold

I recently launched SocialSave Hub ( https://socialsavehub.com ) — a free browser-based tool to download videos from Instagram, Facebook, and Twitter/X. Here's a quick look at how it works technically.

Architecture

Pure PHP 8.2, MVC pattern, no framework, no Composer. Hosted on shared hosting. The whole thing runs without Node.js, no npm, no build step.

How Scraping Works

Each platform has a scraper with a fallback chain:

Instagram : graphql → embed_page → page_source

Facebook : mobile_page → page_source

Twitter : syndication_api → fxtwitter_api → oembed

The scrapers hit public CDN URLs — no authentication bypassing, only publicly accessible content.

Stack

Backend: PHP 8.2, PDO, custom router

Frontend: Tailwind CDN + vanilla JS

DB: MySQL 8.0

No Composer, no npm

Key Design Decisions

No watermarks — deliver the original CDN file directly

No login required — zero friction for users

Rate limiting — IP-based, stored in DB

Cache layer — 30-min TTL on extracted URLs to reduce CDN load

The full…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.