PHPackages                             safesurf/safesurf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. safesurf/safesurf

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

safesurf/safesurf
=================

A PHP library for checking if a URL is safe to surf.

v1.0.0(2mo ago)25MITPHPPHP &gt;=8.0CI passing

Since Apr 28Pushed 1mo agoCompare

[ Source](https://github.com/DikaArdnt/safesurf-php)[ Packagist](https://packagist.org/packages/safesurf/safesurf)[ Docs](https://github.com/DikaArdnt/safesurf-php)[ GitHub Sponsors](https://github.com/DikaArdnt)[ RSS](/packages/safesurf-safesurf/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

SafeSurf (PHP Library)
======================

[](#safesurf-php-library)

Disclaimer
----------

[](#disclaimer)

This project is a PHP-native rewrite of the repository [abhizaik/urlvet](https://github.com/abhizaik/urlvet).

SafeSurf for PHP focuses on transparent analysis results (reasons), scores, and verdicts.

Features
--------

[](#features)

- Real-time URL analysis: redirect chain, HTTP status, HSTS
- Domain &amp; DNS signals: rank (top-1m), IP resolution, NS/MX validity, domain age, domain expiry
- URL signals: keywords, URL shortener, excessive length/depth, subdomain count, punycode
- TLS/SSL signals: TLS presence, issuer, certificate age, chain validation (best effort)
- Page content (best effort): title, login/payment/personal form detection, hidden iframe, brand mismatch
- Threat feed: PhishTank (optional, depending on API availability)
- Optional caching via phpfastcache to speed up network lookups and data parsing

System Requirements
-------------------

[](#system-requirements)

- PHP &gt;= 8.0
- PHP extensions: `curl`, `openssl`, `dom`, `libxml`

Installation (via Composer / Packagist)
---------------------------------------

[](#installation-via-composer--packagist)

```
composer require safesurf/safesurf
```

Installation (from this source repository)
------------------------------------------

[](#installation-from-this-source-repository)

```
git clone https://github.com/DikaArdnt/safesurf-php.git
cd safesurf-php
composer install
```

Quick Start
-----------

[](#quick-start)

```
php examples/analyze.php example.com
```

Using in Your Code (without cache)
----------------------------------

[](#using-in-your-code-without-cache)

```
