WireHttp::status() method

Send to a URL using a HEAD request and return the status code

Usage

// basic usage
$bool = $http->status(string $url);

// usage with all arguments
$bool = $http->status(string $url, mixed $data = [], bool $textMode = false, array $options = []);

Arguments

NameType(s)Description
urlstring

URL to request (including http:// or https://)

data (optional)mixed

Array of data to send (if not already set before) or raw data

textMode (optional)bool

When true function will return a string rather than integer, see the statusText() method.

options (optional)array

Optional options to modify default behavior, see the send() method for details.

Return value

bool int string

False on failure or integer or string of status code (200|404|etc) on success.

See Also


$http methods and properties

API reference based on ProcessWire core version 3.0.214

Twitter updates

  • This week ProcessWire 3.0.214 is on the dev branch. Relative to 3.0.213 this version has 16 new commits which include the addition of 3 new pull requests, 6 issue fixes, a new WireNumberTools utility class, and various other improvements. More
    17 March 2023
  • ProcessWire 3.0.213 core updates: This week we’ll look at the new WireSitemapXML module, a new WireNumberTools core class, and a new ability for Fieldtype modules to specify useful ready-to-use configurations when creating new fields. More
    24 February 2023
  • ProcessWire 3.0.212 core updates— More
    17 February 2023

Latest news

  • ProcessWire Weekly #462
    In the 462nd issue of ProcessWire Weekly we'll cover the latest core updates, check out a new third party module called Template Access Log, and more. Read on!
    Weekly.pw / 18 March 2023
  • ProcessWire 3.0.213 core updates
    This week we’ll look at the new WireSitemapXML module, a new WireNumberTools core class, and a new ability for Fieldtype modules to specify useful ready-to-use configurations when creating new fields.
    Blog / 24 February 2023
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer