PHPackages                             hedii/http-punch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. hedii/http-punch

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hedii/http-punch
================

A php library to punch an http endpoint

2.0.1(8y ago)114MITPHPPHP &gt;=7.1

Since Jul 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hedii/http-punch)[ Packagist](https://packagist.org/packages/hedii/http-punch)[ RSS](/packages/hedii-http-punch/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

[![Build Status](https://camo.githubusercontent.com/c679e08ce366e40f9534bdbd409d3f495d731cf5d73f40576a72013f055b6952/68747470733a2f2f7472617669732d63692e6f72672f68656469692f687474702d70756e63682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hedii/http-punch)

http-punch
==========

[](#http-punch)

Http punch is a php library for punching (visiting) an http url.

It can be used to check whether an host is online or offline, to check a server response time, to hit a cron job url, to hit a webhook url, etc...

Table of contents
-----------------

[](#table-of-contents)

- [Table of contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
    - [Instantiation](#instantiation)
    - [Perform an http punch](#perform-an-http-punch)
    - [The result array](#the-result-array)
- [Testing](#testing)
- [License](#license)

Installation
------------

[](#installation)

Install via [composer](https://getcomposer.org/doc/00-intro.md)

```
composer require hedii/http-punch
```

Usage
-----

[](#usage)

### Instantiation

[](#instantiation)

Create a http punch instance:

```
