sentrasoft/laravel-netutils
Composer 安装命令:
composer require sentrasoft/laravel-netutils
包简介
Network Utilities for Laravel
README 文档
README
PHP Library for Networking Tools (IPv4 and IPv6) Use for Laravel 5
Install
Via Composer
$ composer require sentrasoft/laravel-netutils
Via edit composer.json
"require": {
"sentrasoft/laravel-netutils": "dev-master"
}
Next, update Composer from the Terminal:
$ composer update
Add to laravel config
Once this operation completes, the final step is to add the service provider. Open config/app.php, and add a new item to the providers array.
'providers' => array( ..... Sentrasoft\Netutils\NetutilsServiceProvider::class, );
Now add the alias.
'aliases' => array( ...... 'Netutils' => Sentrasoft\Netutils\Facades\Netutils::class, );
Usage
// Generate network object $network = new Netutils; // The default IP set to 127.0.0.1 and Netmask 255.255.255.0 // Set the IP and Netmask $network::setIP('10.3.30.179'); $network::setNetmask('255.255.255.0'); // Get the IP and Netmask $ip = $network::getIP(); $netmask = $network::getNetmask(); // Get Ping latency from current IP set $latency = $network::ping()->ping(); // Get Ping latency from given ip $latency = $network::ping('192.168.1.123')->ping(); // Get Network info from current IP set $network = $network::network()->info; // Get Network info from given IP and Netmask $network = $network::network('192.168.1.123','255.255.255.0')->info; // Get individual Network info $CIDR = Network::network()->CIDR; $broadcast = (string)Network::network()->broadcast; // Get MAC address from target's IP $mac = $network::network()->mac; // Bonus Wake On Lan // Netutils::WakeOnLan('Mac Address','Broadcast Address')->WakeUp(); $wakeOnLan = $network::WakeOnLan('74-27-ea-5e-74-59','10.3.30.255')->WakeUp();
Support Us
Help us to keep making awesome stuff. You don't have to be a developer to support our open source work. If you want to receive personal support, or just feel all warm and fuzzy inside from helping open source development, donations are very welcome. Thank you.
License
The MIT License (MIT). Please see License File for more information.
sentrasoft/laravel-netutils 适用场景与选型建议
sentrasoft/laravel-netutils 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 54 次下载、GitHub Stars 达 6, 最近一次更新时间为 2019 年 04 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「network」 「laravel」 「IP」 「ping」 「lan」 「wake-on-lan」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sentrasoft/laravel-netutils 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sentrasoft/laravel-netutils 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sentrasoft/laravel-netutils 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
PHP SDK for Bands In Town API
Ping for Laravel.
Serve Laravel Assets from a Content Delivery Network (CDN)
统计信息
- 总下载量: 54
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-02