lanbin
Member
I would like to share my new project with you — a free PHP script for creating short URLs with password protection. This script will help you quickly and easily create short links for your long URLs, as well as manage these links, delete them, and view click statistics.
The script is completely free and available to everyone. You can download it from this link and save it as index.php or under any other name.
Script Features:
- Create Short URLs: Simple interface for entering long URLs and creating short links.
- Password Protection: Ability to create and delete links only when the correct password is entered.
- Click Statistics: Track the number of clicks on each short URL.
- Pagination: Convenient navigation through pages with links.
- Security: Input filtering and validation to prevent XSS and other vulnerabilities.
Installation Instructions:
1. Download the script: Go to this link and download the script file.
2. Save the file: Save the file as index.php or any other name of your choice.
3. Set your password: In the index.php file, replace the value of the variable $correct_password with your own password:
PHP:
$correct_password = 'your_secure_password';
5. Configure the server: If you are using Apache, add an .htaccess file to ensure the script works correctly:
Apache config:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
Example Usage:
Create a link: Enter the long URL and password, then click the "Create Short URL" button.
Manage links: To delete a link, enter its short code and password, then click the "Delete Short URL" button.
View statistics: At the bottom of the page, you can see all created links and the number of clicks on them. Use pagination for navigation.
If you have any questions or suggestions, please leave your comments in this thread. I hope the script will be useful to you!