PHP Classes

How to Use PHP Short URL Script Downloading or Installing with PHP Composer the Package URL Shortener Application: Application to create and redirect short URLs

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-08-13 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
url-shortener-php 1.0Custom (specified...7.1HTTP, Web services, PHP 7, Applications
Description 

Author

This package provides an application to create and redirect short URLs.

The application provides Web pages to allow users to perform several actions to manage short URLs:

Currently, it allows to:

- Register users

- Login a user

- Logout a user

- Create a short URL

- Edit a short URL

- Delete a short URL

- Redirect the access of a user to a short URL to the destination URL

Innovation Award
PHP Programming Innovation award nominee
August 2025
Number 6
Short URLs are useful to share URLs of pages that are too long to expect the users will remember all the URL characters to type them manually.

This package provides a PHP application that allows users to create, edit and delete short URLs from long URL by accessing the application Web pages.

The application can also expand the short URLs and redirect users when the short URL pages are accessed.

Manuel Lemos
Picture of Amirreza Ebrahimi
  Performance   Level  
Name: Amirreza Ebrahimi is available for providing paid consulting. Contact Amirreza Ebrahimi .
Classes: 2 packages by
Country: Iran Iran
Age: 23
All time rank: Not yet ranked
Week rank: Not yet ranked
Innovation award
Innovation award
Nominee: 2x

Instructions

Documentation

<p align="center"> <img src="https://HeroExpert.ir/GitHub/Preview.png" width="300" alt="HeroExpert Logo"> </p>

URL Shortener - Fast, Secure, and Scalable

HeroExpert-Team proudly presents this URL Shortener project designed for developers and businesses who need an efficient, reliable, and easy-to-use tool to shorten and track URLs. With a focus on speed, security, and scalability, this project offers powerful features and a modern user interface to optimize your web experience.

? Key Features

  • Instant URL Shortening: Transform long URLs into short, professional links in seconds.
  • Auto-Generated QR Codes: Every shortened link comes with a unique QR code for effortless sharing.
  • Advanced Analytics: Track clicks, analyze performance, and monitor engagement over time.
  • Secure User Authentication: Protect user accounts with encryption and authentication mechanisms.
  • Cutting-Edge Security: Robust encryption and validation ensure your data and URLs remain safe.
  • Responsive & User-Friendly Design: Seamlessly optimized for mobile, tablet, and desktop experiences.
  • Blazing-Fast Performance: Engineered for high traffic loads with lightning-fast response times.
  • User Dashboard: Easily manage your shortened URLs, track analytics, and access your personal link history.
  • Multi-Language Support: This project supports both English and Farsi (Persian). You can change the language easily via the `.env` file.

? Technologies Used

We?ve built this project using modern, high-performance technologies to ensure speed, security, and scalability:

  • ? PHP 8.2+ ? A powerful backend language designed for efficiency and performance.
  • ? MVC Architecture ? Clean separation of logic, presentation, and request handling.
  • ? MySQL ? A robust, reliable relational database.
  • ? Composer ? Streamlined dependency management for PHP.
  • ? Laravel Eloquent ORM ? Effortless and elegant database interactions.
  • ? Apache ? Optimized application hosting for seamless performance.
  • ? JavaScript ? Enhancing user experience with interactive elements.
  • ? Bootstrap 5 ? A modern front-end framework for responsive, beautiful designs.
  • ? PHP Mailer ? Secure email handling for notifications and user verification.
  • ? Unit Testing (PHPUnit) ? Automated tests to ensure code reliability and stability.

? With this cutting-edge tech stack, our URL Shortener is built for speed, security, and scalability!

? Quick Start

To get up and running quickly, follow these steps:

1. Clone the repository

Clone the project repository to your local machine:

git clone https://github.com/HeroExpert-Team/Url-Shortener

2. Install Dependencies

Make sure you have Composer installed on your machine. Then, run the following command to install the necessary dependencies:

composer install

3. Configure Environment Variables

Edit the .env file and update it with your database, email, host address, and other environment settings.

4. Run Database Migrations

Run the following command to set up the database schema:

composer migrate

5. Serve the Application

Start the local development server with the following command:

composer serve

Your application will now be accessible at http://localhost:8181 in your browser.

? Shorten URLs

After setting up the project, you can perform the following actions:

  • Shorten URLs: Enter your long URL into the shortening input field and click "Shorten URL."
  • Track Clicks: Monitor how often your shortened URL is clicked, and view detailed analytics on the dashboard.
  • Manage Links: Edit or delete any of your shortened URLs directly from your user dashboard.

? Contributing

We welcome contributions from developers of all skill levels! Here's how you can contribute to this project:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix:

    `git checkout -b feature/your-feature`

  3. Make your changes and commit them:

    `git commit -m "Your detailed commit message"`

  4. Push your changes to your fork:

    `git push origin feature/your-feature`

  5. Submit a pull request describing your changes.

? License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). You are free to use, modify, and distribute this project under the terms of the license.

For more details, see the LICENSE file.

??? About HeroExpert-Team

HeroExpert-Team is a passionate group of developers committed to building practical, efficient, and innovative software solutions. We believe in the power of open-source development to empower businesses and developers, helping them achieve their goals faster and more effectively.

Stay connected with us to explore our latest projects and contributions!

? Connect with Us

<p align="center"> Made with ?? by <a href="https://github.com/HeroExpert-Team">HeroExpert-Team</a> </p>


  Files folder image Files (73)  
File Role Description
Files folder imageApp (5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (2 files)
Files folder imagedatabase (1 file, 1 directory)
Files folder imagehelpers (1 file)
Files folder imagelang (2 files)
Files folder imagepublic (1 directory)
Files folder imageresources (2 directories)
Files folder imageroutes (1 file)
Files folder imagetests (1 file, 4 directories)
Accessible without login Plain text file .env Data Auxiliary data
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file index.php Appl. Application bootstrap script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (73)  /  App  
File Role Description
Files folder imageControllers (3 files)
Files folder imageCore (2 files, 1 directory)
Files folder imageModels (3 files)
Files folder imageServices (1 file)
Files folder imageUtilities (5 files)

  Files folder image Files (73)  /  App  /  Controllers  
File Role Description
  Accessible without login Plain text file AuthController.php Class Class source
  Accessible without login Plain text file HomeController.php Class Class source
  Accessible without login Plain text file PanelController.php Class Class source

  Files folder image Files (73)  /  App  /  Core  
File Role Description
Files folder imageRouting (2 files)
  Accessible without login Plain text file Migration.php Class Class source
  Accessible without login Plain text file Request.php Class Class source

  Files folder image Files (73)  /  App  /  Core  /  Routing  
File Role Description
  Accessible without login Plain text file Route.php Class Class source
  Accessible without login Plain text file Router.php Class Class source

  Files folder image Files (73)  /  App  /  Models  
File Role Description
  Accessible without login Plain text file Url.php Class Class source
  Accessible without login Plain text file User.php Class Class source
  Accessible without login Plain text file View.php Class Class source

  Files folder image Files (73)  /  App  /  Services  
File Role Description
  Accessible without login Plain text file Email.php Class Class source

  Files folder image Files (73)  /  App  /  Utilities  
File Role Description
  Accessible without login Plain text file Auth.php Class Class source
  Accessible without login Plain text file Cookie.php Class Class source
  Accessible without login Plain text file ExceptionHandler.php Class Class source
  Accessible without login Plain text file Lang.php Class Class source
  Accessible without login Plain text file Session.php Class Class source

  Files folder image Files (73)  /  bootstrap  
File Role Description
  Accessible without login Plain text file bootstrap.php Example Example script

  Files folder image Files (73)  /  config  
File Role Description
  Accessible without login Plain text file database.php Example Example script
  Accessible without login Plain text file serve.php Example Example script

  Files folder image Files (73)  /  database  
File Role Description
Files folder imagemigrations (3 files)
  Accessible without login Plain text file migration.php Example Example script

  Files folder image Files (73)  /  database  /  migrations  
File Role Description
  Accessible without login Plain text file 01_create_table_users.php Class Class source
  Accessible without login Plain text file 02_create_table_urls.php Class Class source
  Accessible without login Plain text file 03_create_table_views.php Class Class source

  Files folder image Files (73)  /  helpers  
File Role Description
  Accessible without login Plain text file helper.php Example Example script

  Files folder image Files (73)  /  lang  
File Role Description
  Accessible without login Plain text file en.php Aux. Configuration script
  Accessible without login Plain text file fa.php Aux. Configuration script

  Files folder image Files (73)  /  public  
File Role Description
Files folder imageQrCode (2 files)

  Files folder image Files (73)  /  public  /  QrCode  
File Role Description
  Accessible without login Image file rdHYC.png Icon Icon image
  Accessible without login Image file Xb-EWFBq.png Icon Icon image

  Files folder image Files (73)  /  resources  
File Role Description
Files folder imageassets (3 directories)
Files folder imageviews (3 directories)

  Files folder image Files (73)  /  resources  /  assets  
File Role Description
Files folder imagecss (2 directories)
Files folder imageimg (1 directory)
Files folder imagejs (3 files, 2 directories)

  Files folder image Files (73)  /  resources  /  assets  /  css  
File Role Description
Files folder imageen (4 files)
Files folder imagefa (4 files)

  Files folder image Files (73)  /  resources  /  assets  /  css  /  en  
File Role Description
  Accessible without login Plain text file email.css Data Auxiliary data
  Accessible without login Plain text file GDLibrary.css Data Auxiliary data
  Accessible without login Plain text file main.css Data Auxiliary data
  Accessible without login Plain text file responsive.css Data Auxiliary data

  Files folder image Files (73)  /  resources  /  assets  /  css  /  fa  
File Role Description
  Accessible without login Plain text file email.css Data Auxiliary data
  Accessible without login Plain text file GDLibrary.css Data Auxiliary data
  Accessible without login Plain text file main.css Data Auxiliary data
  Accessible without login Plain text file responsive.css Data Auxiliary data

  Files folder image Files (73)  /  resources  /  assets  /  img  
File Role Description
Files folder imageicon (4 files)

  Files folder image Files (73)  /  resources  /  assets  /  img  /  icon  
File Role Description
  Accessible without login Image file github-image.png Icon Icon image
  Accessible without login Image file linkedin-image.png Icon Icon image
  Accessible without login Image file reset-image.png Icon Icon image
  Accessible without login Image file telegram-image.png Icon Icon image

  Files folder image Files (73)  /  resources  /  assets  /  js  
File Role Description
Files folder imageen (2 files)
Files folder imagefa (2 files)
  Accessible without login Plain text file clipboard.min.js Data Auxiliary data
  Accessible without login Plain text file gsap.min.js Data Auxiliary data
  Accessible without login Plain text file popper.min.js Data Auxiliary data

  Files folder image Files (73)  /  resources  /  assets  /  js  /  en  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file index.js Data Auxiliary data

  Files folder image Files (73)  /  resources  /  assets  /  js  /  fa  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file index.js Data Auxiliary data

  Files folder image Files (73)  /  resources  /  views  
File Role Description
Files folder imageerrors (5 files)
Files folder imagehome (3 files)
Files folder imagepanel (2 files)

  Files folder image Files (73)  /  resources  /  views  /  errors  
File Role Description
  Accessible without login Plain text file 404.php Aux. Configuration script
  Accessible without login Plain text file 405.php Aux. Configuration script
  Accessible without login Plain text file 500.php Aux. Configuration script
  Accessible without login Plain text file development.php Example Example script
  Accessible without login Plain text file GDLibrary.php Aux. Configuration script

  Files folder image Files (73)  /  resources  /  views  /  home  
File Role Description
  Accessible without login Plain text file index.php Example Example script
  Accessible without login Plain text file login.php Aux. Configuration script
  Accessible without login Plain text file verify.php Aux. Configuration script

  Files folder image Files (73)  /  resources  /  views  /  panel  
File Role Description
  Accessible without login Plain text file editUrl.php Example Example script
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files (73)  /  routes  
File Role Description
  Accessible without login Plain text file web.php Class Class source

  Files folder image Files (73)  /  tests  
File Role Description
Files folder imageModels (3 files)
Files folder imageRequest (1 file)
Files folder imageRouting (1 file)
Files folder imageUtilities (3 files)
  Accessible without login Plain text file HelperTest.php Class Class source

  Files folder image Files (73)  /  tests  /  Models  
File Role Description
  Accessible without login Plain text file UrlTest.php Class Class source
  Accessible without login Plain text file UserTest.php Class Class source
  Accessible without login Plain text file ViewTest.php Class Class source

  Files folder image Files (73)  /  tests  /  Request  
File Role Description
  Accessible without login Plain text file RequestTest.php Class Class source

  Files folder image Files (73)  /  tests  /  Routing  
File Role Description
  Accessible without login Plain text file RouteTest.php Class Class source

  Files folder image Files (73)  /  tests  /  Utilities  
File Role Description
  Accessible without login Plain text file ExeptionTest.php Class Class source
  Accessible without login Plain text file LangTest.php Class Class source
  Accessible without login Plain text file SessionTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0