=== Link Secure Pro ===
Contributors: LinkSecureTeam
Tags: analytics, link shortener, protection, anti-bot, monetization, dead link reporter, 1fichier
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.3.5
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The ultimate link protection system with built-in Data Center Analytics, Anti-Bot protection, and Multi-Shortener monetization.

== Description ==

**Link Secure Pro** transforms how you manage external links on your WordPress site. Designed for high-traffic websites (Download, Streaming, Anime), it secures your links while maximizing your revenue.

**🔥 NEW IN V2: ANALYTICS DATA CENTER**
Stop flying blind! The new Dashboard gives you real-time insights:
* **Top Links:** See exactly which files are being downloaded.
* **Top Referrers:** Discover which posts generate the most traffic.
* **Dead Link Reporter:** Allow visitors to report broken links directly from the loading page.
* **Real-time Charts:** visualize traffic spikes instantly.

**🛡️ Core Features:**
* **AES-256 Encryption:** Links are encrypted server-side (no base64 easy bypass).
* **Smart Anti-Bot:** Mathematical Captcha (SVG Fallback) blocks scrapers.
* **Revenue Booster:** Rotate between multiple URL shorteners (Ouo, Exe, 1Fichier, etc.) to maximize CPM.
* **Global Translation:** Auto-detects visitor language (EN, FR, ES, DE, IT, PT, RU, AR, JA, ZH, KO).
* **1Fichier Affiliate:** Automatically injects your Affiliate ID into 1fichier links.

== Installation ==

1. Upload the `link-secure-pro` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **Link Secure > Settings** to configure your API keys and protection mode.
4. Go to **Link Secure > Analytics** to view your traffic.

== Screenshots ==

1. **Analytics Dashboard:** The new Data Center with charts and top lists.
2. **Dead Link Alert:** How reported links appear in the admin panel.
3. **Loading Page:** The secure timer page with the "Report Dead Link" button.
4. **Settings Panel:** Easy configuration for Shorteners and Design.

== Changelog ==

## [2.3.5] - 2026-01-16
### Security & Core Logic
- **Anti-Virus Compliance:** Major refactoring. Separated API configurations into `includes/apis.php` to isolate data arrays from executable logic, preventing false-positive malware flags from host scanners (Imunify360, BitNinja).
- **Fail-Safe Encryption:** Added a robust fallback mechanism for servers where OpenSSL extensions are missing or misconfigured.

### Fixed
- **GPLinks Integration:** Fixed "URL Invalid" error by implementing a recursive URL cleaner (`ls_deep_clean_url`) that correctly handles double/triple encoded URLs.
- **Analytics Accuracy:** Fixed "Shadow Clicks" issue. Click tracking is now triggered via JavaScript (`navigator.sendBeacon`) only upon user interaction, effectively filtering out bot traffic and closed tabs.
- **Expired Links:** Fixed decryption failures for older links by implementing a multi-format decryption strategy (tries AES-256 first, then legacy Base64).

## [2.3.4]
### Fixed
- Resolved an issue causing redirection loops with certain shortener services.

## [2.3.3]
### Fixed
- Resolved "Expired Link" false positives on specific server configurations.
### Changed
- Added Fail-Safe mode for environments without OpenSSL support.

## [2.3.2]
### Added
- **Dead Link Reporting:** Visitors can now report broken links directly from the loading page.
- **Admin Safe Mode:** Logged-in administrators are no longer tracked in Analytics to prevent IP bans during testing.

### Security
- **Rate Limiting:** Added IP-based limiting (Max 5 reports/hour) to prevent spamming the report database.

### Fixed
- **Race Condition:** Resolved an issue where clicks were counted twice on fast browsers (Chrome/Edge).

### Changed
- **UI:** Improved footer visibility with a white background bar and professional legal disclaimer.
- **System:** Migrated update server logic to GitLab for better stability.

## [2.2.0]
### Fixed
- Improved click deduplication logic (60-second buffer).
### Changed
- Enhanced tracking accuracy for mobile devices in Analytics.

## [2.1.0]
### Changed
- **Database:** Optimized table structure (`wp_ls_analytics`) for better performance on high-traffic sites.
- **UI:** Fixed badge color display issues in the dashboard.

## [2.0.0] - Major Update
### Added
- **Analytics Dashboard:** Complete overhaul with Top Domains, Referrers, and Shortener usage stats.
- **Localization:** Added Asian Language Support (Japanese, Simplified Chinese, Korean).
- **Branding:** Added "Powered By" branding in the loading page footer.
- **Maintenance:** Added a Maintenance Zone in settings to reset data easily.

## [1.1.0]
### Changed
- **Captcha:** Refactored engine to use SVG Fallback, allowing it to work on servers without the PHP GD Library.
### Added
- Support for RTL languages (Arabic).

## [1.0.9.8]
### Added
- New shortener service integrations.

## [1.0.9.4]
### Security
- Major code refactoring to comply with strict server security policies.
### Fixed
- Resolved a critical conflict causing errors on specific hosting environments during redirection.
- Improved core functions loading order to prevent admin display issues.

## [1.0.9]
### Changed
- Compatibility verified with WordPress 6.9.
- Enhanced Shortener API connection stability.
### Fixed
- Minor CSS adjustments in the dashboard.

## [1.0.8]
### Changed
- Updated compatibility checks for WordPress core.
### Fixed
- Improved description display in the admin panel.

## [1.0.7]
### Added
- **Support Tab:** Added a dedicated support section in the admin panel.
### Fixed
- Version number synchronization issues.

## [1.0.4]
### Added
- **API Mode:** Added support for Clk.sh and ShrinkMe (fixes AdBlock issues).
### Fixed
- Branding protection improvements.

== Disclaimer ==

Link Secure Pro is a technical tool designed for link management, analytics, and bot protection. 
The authors of this plugin are not responsible for:
1. The nature of the content linked by the websites using this plugin.
2. The availability or legality of the destination URLs.
3. Any misuse of the software for spamming or illegal activities.

This software is provided "as is", without warranty of any kind.
