Giter Club home page Giter Club logo

notusedagain / link-shortener Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 86 KB

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.

Home Page: https://github.com/wildyrando/Link-Shortener

License: MIT License

PHP 100.00%
link-short linkshort linkshortener linkshorter phpcode shortlink source linkshorteners phpsource

link-shortener's Introduction

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/wildyrando/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://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.

link-shortener's People

Contributors

notusedagain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.