Ana Sayfa / Kod ve Scriptler / URL Shortener

URL Shortener

URL kısaltıcı; uzun URL'leri yönlendirmeli, paylaşılabilir kısa bağlantılara dönüştürür.

  • Yayın tarihi18 Şubat 2025
  • Nerede çalışırPHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0, PHP 8.1, PHP 8.2, PHP 8.3
  • Son güncelleme5 Mart 2025
URL Shortener

Overview

The URL shortener application allows users to input long URLs and generates shorter, more manageable links. It stores the mappings between the original and shortened URLs in a JSON file, enabling persistent access. Users can also opt for custom short codes if desired. When a short URL is accessed, the application redirects the user to the corresponding long URL, making it easier to share links across various platforms. Additionally, it includes CSRF protection to enhance security during form submissions. This tool is useful for simplifying links.

Features

  1. URL Shortening: Converts long URLs into shorter, shareable links.
  2. Custom Short Codes: Allows users to create personalized short codes.
  3. Persistent Storage: Stores URL mappings in a JSON file for long-term access.
  4. Redirection: Automatically redirects users from short URLs to the original long URLs.
  5. CSRF Protection: Implements security measures to prevent cross-site request forgery during form submissions.
  6. reCAPTCHA Integrated: Enhances security by incorporating reCAPTCHA verification to ensure that actions are performed by humans.

Requirements

1. PHP Version - PHP 7.0 or higher is recommended for optimal performance and security.

2. Web Server - A web server capable of running PHP, such as Apache or Nginx.

3. File Permissions - The application must have write permissions to the directory where 'urls.json' will be stored, allowing it to create and update the file.

4. JSON Support - PHP must have JSON support enabled (usually enabled by default in modern PHP installations).

5. Session Support - PHP sessions must be enabled to handle CSRF protection and maintain state across requests.

6. Basic HTML/CSS Knowledge - Familiarity with HTML and CSS is helpful for customizing the user interface.

7. Browser - A modern web browser for testing and using the application.

8. reCAPTCHA Integration - Incorporates reCAPTCHA verification to ensure actions are performed by human users, enhancing security and preventing automated abuse.