Skip to content

This is a simple link shortener application written in PHP. It allows users to enter a long URL and generates a shortened version of the link. The application uses a MySQL database for storing the original and shortened links.

License

Notifications You must be signed in to change notification settings

wildyverando/Link-Shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link Shortener

This is a simple link shortener application written in PHP. It allows users to enter a long URL and generates a shortened version of the link. The application uses a MySQL database for storing the original and shortened links.

Prerequisites

Before running this application, make sure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/wildyverando/Link-Shortener.git
  2. Navigate to the project directory:

    cd Link-Shortener
  3. Install the dependencies using Composer:

    composer install
  4. Set up the environment variables:

Rename the .env.example file to .env. Open the .env file and set the appropriate values for the database connection (DB_HOST, DB_NAME, DB_USER, DB_PASS). and setup reCaptcha sitekey & secretkey

  1. Import the database schema:

Create a new MySQL database. Import the linkshortener.sql file located in the database directory into the newly created database.

  1. Start the application:

You can use a local development server to run the application, such as PHP's built-in server:

php -S localhost:8000

or you can using hosting like cpanel, directadmin, vps, replit

Usage

  • Open your web browser and navigate to the application URL (e.g., http:https://localhost:8000).
  • Enter a long URL into the input field and click the "Shorten" button.
  • The application will generate a shortened link for the entered URL.
  • Click on the shortened link to test it.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This is a simple link shortener application written in PHP. It allows users to enter a long URL and generates a shortened version of the link. The application uses a MySQL database for storing the original and shortened links.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages