-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
857855b
commit 5bff240
Showing
3 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* User: Jason Olson | ||
* Date: 3/5/2019 | ||
* Time: 9:28 AM | ||
* License: MIT | ||
*/ | ||
|
||
namespace RedWebDev; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|