承接 parvion/ip-intelligence 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

parvion/ip-intelligence

Composer 安装命令:

composer require parvion/ip-intelligence

包简介

A high-performance Laravel package for IP intelligence, geolocation, and device detection.

README 文档

README

PHP Version Laravel License: MIT

A robust, ultra-fast, and zero-dependency Laravel package that collects and analyzes visitor information from Request IPs and User Agents.

This package provides deep insights into your visitors, featuring built-in geolocation, device detection, browser parsing, bot detection, VPN/Proxy detection, and more—all without relying on heavy third-party device libraries like Mobile_Detect.

🌟 Core Features

  • Zero Third-Party Dependencies: Custom-built parsers ensure maximum performance without the bloat of massive external libraries.
  • Advanced Geolocation: Instantly detects Continents, Countries, States, Cities, Timezones, Zip Codes, ISPs, and ASNs.
  • Smart Device Detection: Accurately identifies exact device platforms (Windows, macOS, iOS, Android), architectures (x64, ARM), types (Desktop, Phone, Tablet), brands (Apple, Samsung, Xiaomi), and models.
  • Browser & Engine Parsing: Detects the browser name, version, and rendering engine (Blink, WebKit, Gecko, Trident).
  • Security & Bot Detection: Sniffs out known web crawlers, Tor exit nodes, proxies, VPNs, and suspicious network topologies.
  • Automated Caching: Geolocation requests are automatically cached using Laravel's Cache to prevent rate limits and boost speed.

📦 Installation

You can install the package via composer:

composer require parvion/ip-intelligence

(Optional) You can publish the configuration file to customize the caching and geolocation providers:

php artisan vendor:publish --provider="Parvion\IpIntelligence\IpIntelligenceServiceProvider"

🚀 How to Use

The package gives you an elegant Facade (IpIntelligence) and a global helper (ip_info()) to access all intelligence seamlessly.

1. Get the Full Intelligence Profile

You can retrieve a comprehensive JSON-ready array of everything detected about the current visitor using the Facade, the global helper, or direct Object Instantiation.

Using Object Instantiation:

use Parvion\IpIntelligence\IpInfo;

$info = new IpInfo();
$profile = $info->all();

Using the Facade:

use Parvion\IpIntelligence\Facades\IpIntelligence;

$profile = IpIntelligence::all();

Using the Global Helper:

$profile = ip_info()->all();

Example Output:

{
    "ip": "8.8.8.8",
    "location": {
        "country": "United States",
        "country_code": "US",
        "state": "Virginia",
        "city": "Ashburn",
        "zip_code": "20149",
        "latitude": 39.03,
        "longitude": -77.5,
        "timezone": "America/New_York",
        "currency": "USD",
        "isp": "Google LLC",
        "organization": "Google Public DNS",
        "asn": "AS15169 Google LLC"
    },
    "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X)...",
    "browser": {
        "name": "Safari",
        "version": "16.0",
        "engine": "WebKit"
    },
    "device": {
        "type": "Mobile",
        "name": "iPhone",
        "brand": "Apple",
        "model": "iPhone"
    },
    "platform": {
        "name": "iOS",
        "version": "16.0",
        "architecture": "ARM64"
    },
    "security": {
        "is_bot": false,
        "bot_name": null,
        "is_vpn": false,
        "is_proxy": false,
        "is_tor": false,
        "is_suspicious": false
    },
    "network": {
        "isp": "Google LLC",
        "asn": "AS15169 Google LLC",
        "organization": "Google Public DNS",
        "hosting": null
    },
    "language": "en-US",
    "referrer": "https://google.com"
}

2. Individual Feature Usage

If you don't need the entire profile, you can call specific methods individually:

IP & Location Detection

IpIntelligence::ip();             // Returns current Request IP (e.g., '192.168.1.1')
IpIntelligence::country();        // 'United States'
IpIntelligence::city();           // 'New York'
IpIntelligence::timezone();       // 'America/New_York'
IpIntelligence::currency();       // 'USD'

Custom IP Lookup

You can lookup a specific IP address instead of using the current Request IP:

IpIntelligence::lookup('8.8.8.8')->city(); 

Device & Browser Parsing

IpIntelligence::deviceType();     // 'Desktop', 'Phone', 'Tablet'
IpIntelligence::deviceBrand();    // 'Apple', 'Samsung', 'Xiaomi', etc.
IpIntelligence::platform();       // 'Windows', 'macOS', 'iOS', 'Android'
IpIntelligence::browser();        // 'Chrome', 'Firefox', 'Safari'
IpIntelligence::browserEngine();  // 'Blink', 'WebKit', 'Gecko'

Security & Network

IpIntelligence::isBot();          // bool
IpIntelligence::botName();        // 'Googlebot', 'Bingbot', null
IpIntelligence::isVpn();          // bool
IpIntelligence::isProxy();        // bool
IpIntelligence::isTor();          // bool
IpIntelligence::network();        // Returns ISP and ASN information array

🛡 License

This package is open-source software licensed under the MIT license.

Copyright (c) 2026 Anand Kumar (Parvion)

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固