Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
reddingwebpro committed Mar 5, 2019
1 parent 857855b commit 5bff240
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
13 changes: 5 additions & 8 deletions example.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<?php
/**
* Created by PhpStorm.
* User: jason_06tt1g7
* Created by ReddingWebDev.
* User: Jason Olson
* Date: 3/5/2019
* Time: 9:30 AM
* Time: 9:28 AM
* License: MIT
*/

require 'httpStatus.php';

$url = "https://google.com"; // url to test

$http = new \RedWebDev\httpStatus();

$status = $http->status($url);
$status = $http->status($url);
1 change: 1 addition & 0 deletions httpStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* User: Jason Olson
* Date: 3/5/2019
* Time: 9:28 AM
* License: MIT
*/

namespace RedWebDev;
Expand Down
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# php-get-http-status
This class was designed in direct response to a forum post at PHPClasses for a class to test to find broken links on a given URL. This class will take a given URL and return the HTTP status code for that page. Therefore it will not only discover if the page is broken (ie 404), but also if its changes (ie 301 redirect) or good as is, (200). This will return the HTTP numerical values as defined in RFC 2616 section 10 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).

# Configuration
In the example file you see we call the class, and we define the target URL as the variable $url. The data is returned as an integer value corresponding to the HTTP status code.

#Revision History:
* 1.0 Initial Release

0 comments on commit 5bff240

Please sign in to comment.