juanparati/copyscape
Composer 安装命令:
composer require juanparati/copyscape
包简介
Copyscape interface for Laravel
README 文档
README
What is it?
A Laravel package that provides a Copyscape interface for their premium API.
Installation
For Laravel 10.x:
composer require juanparati/copyscape "~10.0"
For Laravel 9.x:
composer require juanparati/copyscape "~4.0"
For Laravel 8.x:
composer require juanparati/copyscape "~3.0"
For Laravel 6.x/7.x:
composer require juanparati/copyscape "~2.0"
For Laravel 5.5 to 5.8:
composer require juanparati/copyscape "~1.0"
For Laravel 5.5 it is required to register the service provider into the "config/app.php":
Juanparati\Copyscape\CopyscapeServiceProvider::class,
For Laravel 5.6+ the service provider is automatically registered.
Configuration
artisan vendor:publish --provider="Juanparati\Copyscape\CopyscapeServiceProvider"
Alias
Optionally add the following Alias in your config/app.php (Aliases section):
'Copyscape' => Juanparati\Copyscape\Facades\CopyscapeClient::class,
Usage examples
Search against URL
// Search without full comparison.
$results = Copyscape::searchURL('http://example.net')->request();
// With optional options
$search = Copyscape::searchURL('https://en.wikipedia.org/wiki/United_States_Declaration_of_Independence');
$search->setFullComparison(5); // Set full comparison (0 for disable, 1-10 for full comparison)
$search->setIgnoreSites(['britannica.com']);
$search->setSpendLimit(0.1);
$search->setTestMode(true);
$results = $search->request();
Search against a text
// Search without full comparison
$results = Copyscape::searchText('We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, as we hold the rest of mankind, Enemies in War, in Peace Friends.')->request();
// With optional options
$search = Copyscape::searchText('We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, as we hold the rest of mankind, Enemies in War, in Peace Friends.');
$search->setFullComparison(5); // Set full comparison (0 for disable, 1-10 for full comparison)
$search->setIgnoreSites(['britannica.com']);
$search->setSpendLimit(0.1);
$search->setTestMode(true);
$results = $search->request();
Search types
It's possible to change the possible search type using the "setSearchType" method:
Copyscape::searchText('Hello Universe')
->setSearchType(\Juanparati\Copyscape\Services\SearchService::SEARCH_TYPE_PRIVATE)
->request();
The following search types are available:
\Juanparati\Copyscape\Services\SearchService::SEARCH_TYPE_PUBLIC // Search against public index
\Juanparati\Copyscape\Services\SearchService::SEARCH_TYPE_PRIVATE // Search against private index
\Juanparati\Copyscape\Services\SearchService::SEARCH_TYPE_BOTH // Search against public and private indexes
Add index from URL
In order to use the private index, remember to create a private index from the Copyscape interface
$results = Copyscape::indexURL('http://example.net', 'my_index_id');
Add index from Text
$results = Copyscape::indexText('Hello World', 'my_index_id');
Get the credit balance
$results = Copyscape::getBalance();
juanparati/copyscape 适用场景与选型建议
juanparati/copyscape 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 848 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 05 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「seo」 「laravel」 「duplicate」 「plagiarism」 「copyscape」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 juanparati/copyscape 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 juanparati/copyscape 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 juanparati/copyscape 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Avoiding Duplicate Content. Extension for Contao Open Source CMS
Help to manage meta data on Laravel Eloquent model
Statamic Fine Seo addon
A fork of the great myclabs/DeepCopy bundle for Symfony
This package allows you to mirror requests in guzzle.
RFC-compliant idempotency support for Laravel APIs - Prevent duplicate operations, ensure safe retries
统计信息
- 总下载量: 848
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-03