pointybeard/uriinfo

Helper class for probing a URL with cURL and returning information about it.

1.0.1 2018-10-08 00:29 UTC

This package is auto-updated.

Last update: 2024-11-08 14:44:04 UTC


README

Latest Stable Version License

Helper class for probing a URL with cURL and returning information about it.

Installation

URIInfo is installed via Composer. To install, use composer require pointybeard/uriinfo or add "pointybeard/uriinfo": "~1.0" to your composer.json file.

Usage Example

Here is a quick and dirty example of how to use this group of classes


include "vendor/autoload.php";

use pointybeard\URIInfo\Lib;

$info = (new Lib\URIInfo("https://example.com"))->run();

## Check the HTTP Status code
var_dump($info->http_code);

Available Properties

This class uses cURL to probe the URL supplied. The properties available match those available from a call to curl_exec(). Specifically these are:

url, content_type, http_code, header_size, request_size, filetime, ssl_verify_result, redirect_count, total_time, namelookup_time, connect_time, pretransfer_time, size_upload, size_download, speed_download, speed_upload, download_content_length, upload_content_length, starttransfer_time, redirect_time, certinfo, primary_ip, primary_port, local_ip, local_port, redirect_url, request_header

See the curl_exec() method in the PHP Manual for more information

Support

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

Contributing

We encourage you to contribute to this project. Please check out the Contributing documentation for guidelines about how to get involved.

License

"URIInfo" is released under the MIT License.