Skip to content

Commit 5bff240

Browse files
committed
patch
1 parent 857855b commit 5bff240

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

example.php

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
<?php
22
/**
3-
* Created by PhpStorm.
4-
* User: jason_06tt1g7
3+
* Created by ReddingWebDev.
4+
* User: Jason Olson
55
* Date: 3/5/2019
6-
* Time: 9:30 AM
6+
* Time: 9:28 AM
7+
* License: MIT
78
*/
8-
99
require 'httpStatus.php';
10-
1110
$url = "https://google.com"; // url to test
12-
1311
$http = new \RedWebDev\httpStatus();
14-
15-
$status = $http->status($url);
12+
$status = $http->status($url);

httpStatus.php

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* User: Jason Olson
55
* Date: 3/5/2019
66
* Time: 9:28 AM
7+
* License: MIT
78
*/
89

910
namespace RedWebDev;

readme.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# php-get-http-status
2+
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).
3+
4+
# Configuration
5+
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.
6+
7+
#Revision History:
8+
* 1.0 Initial Release
9+

0 commit comments

Comments
 (0)