spaze/url-checker
Composer 安装命令:
composer create-project spaze/url-checker
包简介
A command line tool to check URL HTTP code and contents.
README 文档
README
A command line tool to check URL HTTP code and contents.
Install
composer create-project --no-dev spaze/url-checker url-checker
Usage
check.php <url> <expected_http_code> <required_text> <forbidden_text> [OPTIONS]
Options
--ignore-case-required-text: Ignore case when looking for the required text. Only ASCII case folding will be done, non-ASCII bytes will be compared by their byte value.--ignore-case-forbidden-text: Ignore case when looking for the forbidden text. Only ASCII case folding will be done, non-ASCII bytes will be compared by their byte value.
The checker sends a request to <url> and checks:
- If the HTTP status code matches
<expected_http_code> - If the page contains
<required_text> - If
<forbidden_text>is not present
Example
bin/check.php https://example.com 200 "required" "FAiLuRe" --ignore-case-forbidden-text
Exit codes
The exit code is
1if the status code doesn't match<expected_http_code>2if<required_text>is missing3if<forbidden_text>is found4if other runtime error occurs
统计信息
- 总下载量: 1.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-14