Download the PHP package ilyagvc/checkhost without Composer

On this page you can find all versions of the php package ilyagvc/checkhost. 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 checkhost

CheckHost PHP

CheckHost PHP is a lightweight PHP wrapper for interacting with the check-host.net API, allowing you to run PING, HTTP, TCP, UDP, DNS, TRACEROUTE checks from a variety of global nodes. It includes flexible country/node filtering and comprehensive result parsing.


✅ Features


📦 Installation

Install via Composer:


🧱 Constructor

Parameters:

Parameter Type Description
$selectedCountries array, null Country name(s), ISO country code(s), or node domain(s) to include/exclude (null = all available nodes) (default = null)
$except bool If true, excludes the specified countries instead of including them (default = false)
$proxy string, null Optional proxy for curl requests (default = null)
$timeout int Request timeout (seconds) for waiting on test results (default = 60)

🔧 Methods

setCountry(array|null $countries = null, bool $except = false): bool

Filters nodes based on country names, codes, or node domains.

Parameter Type Description
$countries array, null Country name(s), ISO country code(s), or node domain(s) to include/exclude (null = all available nodes) (default = null)
$except bool If true, excludes the specified countries instead of including them (default = false)

getNodes(): array

Returns the currently selected and filtered node list.
No parameters.


getNodesIp(): array|false

Fetches the raw IP list of all available nodes from check-host.net.
No parameters.


updateNodes(): bool

Refreshes and re-applies node filters to fetch the latest node list.
No parameters.


sendRequest(string $host, string $type, int $maxNodes = 0): string|false

Sends a check request of a given type to selected nodes.

Parameter Type Description
$host string The target domain or IP to check
$type string Type of check: one of ping, http, tcp, udp, dns, traceroute
$maxNodes int Maximum number of nodes to use. Any value other than 0 overrides the selected nodes and uses up to the specified number of available nodes (0 = use selected nodes) (default = 0)

getResults(string $requestId): array|false

Fetches the result of a previously sent check request.

Parameter Type Description
$requestId string ID returned by sendRequest()

runCheck(string $host, string $type, int $maxNodes = 0): array|false

Combines sendRequest() and getResults() into a single call, returning structured data.

Parameter Type Description
$host string The target domain or IP to check
$type string Type of check: one of ping, http, tcp, udp, dns, traceroute
$maxNodes int Maximum number of nodes to use. Any value other than 0 overrides the selected nodes and uses up to the specified number of available nodes (0 = use selected nodes) (default = 0)

fullCheck(string $host): array|false

Performs all checks (ping, http, tcp, udp, dns, traceroute) on the given host.

Parameter Type Description
$host string The target domain or IP to check

setProxy(string $proxy): void

Sets or updates a proxy to be used for all cURL HTTP requests.

Parameter Type Description
$proxy string Proxy address, e.g., http://127.0.0.1:8080

setTimeout(int $seconds): void

Sets the timeout for all result fetching requests.

Parameter Type Description
$seconds int Timeout duration in seconds

📦 Example Usage

Ping Check

Sample Output (Simplified)


Full Check

Sample Output (Simplified)


🌐 Node Filtering

Filter to only Germany and Austria nodes:

Exclude France:


🔄 Proxy & Timeout


📄 License

MIT


📬 Contact

Developed by ILYAGVC Feel free to open issues or PRs!


All versions of checkhost with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 ilyagvc/checkhost contains the following files

Loading the files please wait ...