Download the PHP package indexnowkit/verify without Composer

On this page you can find all versions of the php package indexnowkit/verify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package verify

IndexNow pre-flight check — indexnowkit/verify

One GET of every URL before it is sent to Yandex, Bing and the other IndexNow engines. A page that says noindex, that robots.txt disallows, that names another canonical URL, that redirects, or that the origin does not serve, is not submitted; each becomes a skipped Result with a stable Reason (noindex, robots_disallowed, non_canonical, redirected, origin_error) in the log, the listeners, the PSR-14 events and the submission store. The engines see only URLs worth crawling — announcing a noindex page or a redirect is at best wasted quota and at worst a reason for an engine to trust the key less.

What it never blocks: 404 and 410. A URL that answers 404 or 410 is submitted as is — that is the deletion signal IndexNow accepts, and the reason to submit a removed page in the first place. IndexNow is a notification, not indexing: the engine decides whether and when to crawl.

Off by default. Installing the package changes nothing until verify.enabled: true.

Packagist Downloads CI Coverage PHPStan PHP

github.com/indexnowkit/php (the php-* repositories are read-only splits)

Install

With a framework adapter (indexnowkit/symfony-bundle, laravel, yii2, yii3) that is all: the adapter finds the package, adds the verify block to its configuration and, once verify.enabled is true, decorates its submitter — the queue, Messenger and yii2-queue workers verify too, because they get the same submitter. check prints one line about it either way (verify: installed, disabled (verify.enabled: false)).

What one GET decides

The URL answers Decision
200 with X-Robots-Tag: noindex / none (no bot prefix, or an IndexNow engine's bot; googlebot: is another engine) or <meta name="robots" content="noindex"> in <head> skipped, Reason::Noindex
200 and robots.txt of the host disallows the path for * or an engine's bot (checked before the GET) skipped, Reason::RobotsDisallowed
200 with Link: <…>; rel="canonical" or <link rel="canonical"> naming another URL (after the core's normalization: tracking parameters, trailing slash) non_canonical: skip → skipped, Reason::NonCanonical; replace → the canonical is submitted instead, when its host is one of yours
3xx redirect: skip → skipped, Reason::Redirected; follow → the chain is followed (max_redirects, http(s), your hosts only) and the target verified; after a 301/308 both URLs are submitted (the page moved), after a 302/303/307 only the original
404, 410 submitted — a deletion
401, 403, 5xx, any other 4xx, a timeout or connection failure origin_error: skip → skipped, Reason::OriginError (retryable: a queue may try again); send → submitted with a warning. A 401/403 on a protected environment means: set verify.enabled: false there

The GET is a real GET (not HEAD: many origins answer HEAD differently), without following redirects, with verify.timeout (5 s) and its own User-Agent (verify.user_agent). Only the <head> of the first 256 KiB is read for the signals; a body that is not text/html / application/xhtml+xml contributes headers only. Comments, attribute order and case do not matter; a relative <link rel="canonical"> resolves against the document's <base href> when it declares one, as a crawler resolves it.

The pre-flight uses its own PSR-18 client, discovered by the core with max_redirects: 0 — not the application's http.client, even when one is configured. It has to see the 3xx answers itself (verify.redirect, verify.max_redirects, the host check on redirect targets), and PSR-18 cannot tell a client someone else built to stop following redirects. http.client keeps carrying the POST submissions; check prints the split (verify.transport).

robots.txt is fetched once per host and process and kept in the PSR-16 cache behind debounce.store (verify.robots_cache_ttl, an hour). A robots.txt that cannot be fetched (not 200, not 404) blocks nothing: one warning per host, every path is treated as allowed — an unreachable robots.txt is no reason to keep quiet.

Time. One blocking GET per URL, sequentially, verify.time_budget (60 s) for the whole batch: past it the rest is sent unverified with one warning, so a queue job never outlives its visibility timeout and gets a second worker.

Batches. A batch above verify.max_batch (100) URLs is sent unverified with one warning: that is the sitemap command, where the site itself lists its URLs (indexnow:sitemap --no-verify says so explicitly). submit --dry-run runs the pre-flight (a GET is harmless) so it shows what would be skipped.

dispatch: sync and verify.delay

With dispatch: sync the pre-flight GETs run inside the web request that changed the page: N URLs cost N round trips to your own origin, and on a single-process development server (symfony server:start without workers, php artisan serve, php yii serve) a request to yourself hangs until the timeout. check warns about it (verify.dispatch). Use dispatch: queue / messenger, or keep verify.enabled: false outside production.

verify.delay (seconds, at most 30) waits before the first GET of a batch, so a queue worker that runs right after the commit does not fetch the page from a cache that still holds the old version; it applies only outside a web request and is ignored with dispatch: sync.

check --sample

Every sample is fetched and reported as one line (verify sample https://…: HTTP 200, index, canonical: self, robots: allowed, code verify.sample, the host of the URL). --sample-class takes a class annotated with #[IndexNow] (<FQCN> — up to three objects of it, <FQCN>:<id> — that one) and resolves their URLs the way the submission does. A noindex, a disallow, another canonical, a redirect, a 4xx/5xx or an unreachable origin is a warning, never an error: production may be unreachable from CI, and the report must not fail a deploy over it. Without the package --sample is an error (check --sample needs indexnowkit/verify), check without samples prints a no sample given line (code verify.sample).

Plain PHP

VerifyingSubmitter implements SubmitterInterface; listeners registered on it see every result (the inner ones and the skipped ones) exactly once; pass the same PSR-14 dispatcher and submission store you gave the inner submitter so the skipped results reach them too. The log lines are fixed strings operators can grep (docs/configuration.md.

For adapter authors

Verify\Adapter\VerifyServices is what a framework adapter wires for this package, in one place: the predicate (package()), the owned options, the validated block, the pre-flight transport, the robots cache, the decorated submitter and command submitter factory, the check lines — as static functions over the pieces, with *For() twins over the core's Adapter\Services for a runtime graph. The Symfony bundle, the Laravel, the Yii2 and the Yii3 adapters build on it; see adapters.md of the core.

Requirements

PHP 8.2+, indexnowkit/core ^0.11; indexnowkit/console ^0.4 for the --sample options of the check command (every adapter has it).

Notes for AI assistants

Versioning

SemVer; until 1.0 minor versions may contain breaking changes, listed in CHANGELOG.md. What the compatibility promise covers: docs/bc.md.

MIT. IndexNow is a trademark of its owner; this project is independent and not affiliated with Microsoft, Yandex or indexnow.org.


All versions of verify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
indexnowkit/core Version ^0.13
psr/log Version ^2.0 || ^3.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package indexnowkit/verify contains the following files

Loading the files please wait ...