承接 myerscode/utilities-web 相关项目开发

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

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

myerscode/utilities-web

Composer 安装命令:

composer require myerscode/utilities-web

包简介

A fluent interface for interacting with web page content and urls.

README 文档

README

A fluent interface for interacting with web sites, page content and URLs.

Latest Stable Version Total Downloads PHP Version Require License Tests codecov

Requirements

  • PHP >= 8.5
  • ext-curl
  • ext-dom
  • ext-filter

Install

composer require myerscode/utilities-web

Usage

use Myerscode\Utilities\Web\Utility;

$web = new Utility('https://example.com');
// or use the static factory
$web = Utility::make('https://example.com');

// Get content from a URL
$content = $web->content()->content();

// Get a DOM crawler for the page
$dom = $web->content()->dom();

// Decode JSON responses
$data = $web->content()->json();

// Ping a host
$result = $web->ping()->ping();
$alive = $web->ping()->isAlive();

// Quick liveness check
$web->isAlive();

// Work with URLs
$uri = $web->url();

// Check response status
$response = $web->response()->check(\Myerscode\Utilities\Web\Data\ResponseFrom::CURL);
$response->isSuccessful(); // true for 2xx

Available Utilities

Content Utility

Fetch and interact with web page content.

Ping Utility

Ping hosts and check latency.

URI Utility

Parse, build and manipulate URLs.

Exception Handling

All package exceptions extend Myerscode\Utilities\Web\Exceptions\WebUtilityException, which extends RuntimeException. This allows catching all package exceptions in one go:

use Myerscode\Utilities\Web\Exceptions\WebUtilityException;

try {
    $content = $web->content()->content();
} catch (WebUtilityException $e) {
    // Handle any package exception
}

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固