-
Notifications
You must be signed in to change notification settings - Fork 4
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
Alexander Krasnoyarov
committed
Oct 28, 2016
1 parent
225d9ba
commit 5a85afa
Showing
30 changed files
with
1,694 additions
and
138 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
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
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
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/AppleWebcrawlerVerifier.php → src/Webcrawler/AppleIncVerifier.php
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
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
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/ExaleadWebcrawlerVerifier.php → src/Webcrawler/DassaultSystemesVerifier.php
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/DeusuWebcrawlerVerifier.php → src/Webcrawler/DeusuVerifier.php
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/GoogleWebcrawlerVerifier.php → src/Webcrawler/GoogleIncVerifier.php
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
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
29 changes: 29 additions & 0 deletions
29
src/Webcrawler/IBMGermanyResearchAndDevelopmentGmbHVerifier.php
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,29 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
use WebcrawlerVerifier\Helper\Range; | ||
|
||
class IBMGermanyResearchAndDevelopmentGmbHVerifier implements VerifierInterface | ||
{ | ||
protected $allowedRanges = [ | ||
'206.253.224.*', | ||
'194.153.113.*', | ||
'206.253.225.*', | ||
'206.253.226.*', | ||
'2001:1be0:1000:160:0:0:0:0/64', | ||
'2001:1be0:1000:167:0:0:0:0/64', | ||
'2001:1be0:1000:168:0:0:0:0/64', | ||
'2001:1be0:1000:169:0:0:0:0/64' | ||
]; | ||
|
||
/** | ||
* Checks whether the given IP address really belongs to a valid host or not | ||
* | ||
* @param $ip string the IP address to check | ||
* @return bool true if the given IP belongs to any of the valid hosts, otherwise false | ||
*/ | ||
public function verify($ip) | ||
{ | ||
return Range::inRange($ip, $this->allowedRanges); | ||
} | ||
} |
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,16 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
class InactiveVerifier implements VerifierInterface | ||
{ | ||
/** | ||
* Checks whether the given IP address really belongs to a valid host or not | ||
* | ||
* @param $ip string the IP address to check | ||
* @return bool true if the given IP belongs to any of the valid hosts, otherwise false | ||
*/ | ||
public function verify($ip) | ||
{ | ||
return false; | ||
} | ||
} |
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
6 changes: 3 additions & 3 deletions
6
src/Webcrawler/SeznamWebcrawlerVerifier.php → src/Webcrawler/LinkedInIncVerifier.php
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/MailRUWebcrawlerVerifier.php → src/Webcrawler/MailRuGroupVerifier.php
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/BingWebcrawlerVerifier.php → ...bcrawler/MicrosoftCorporationVerifier.php
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/SputnikWebcrawlerVerifier.php → src/Webcrawler/OJSCRostelecomVerifier.php
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
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,20 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
use WebcrawlerVerifier\DNS\HostVerifier; | ||
|
||
class OdnoklassnikiLLCVerifier implements VerifierInterface | ||
{ | ||
protected $allowedHostNames = ['odnoklassniki.ru']; | ||
|
||
/** | ||
* Checks whether the given IP address really belongs to a valid host or not | ||
* | ||
* @param $ip string the IP address to check | ||
* @return bool true if the given IP belongs to any of the valid hosts, otherwise false | ||
*/ | ||
public function verify($ip) | ||
{ | ||
return HostVerifier::verify(gethostbyaddr($ip), $this->allowedHostNames); | ||
} | ||
} |
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,20 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
use WebcrawlerVerifier\DNS\HostVerifier; | ||
|
||
class SeznamCzASVerifier implements VerifierInterface | ||
{ | ||
protected $allowedHostNames = ['seznam.cz']; | ||
|
||
/** | ||
* Checks whether the given IP address really belongs to a valid host or not | ||
* | ||
* @param $ip string the IP address to check | ||
* @return bool true if the given IP belongs to any of the valid hosts, otherwise false | ||
*/ | ||
public function verify($ip) | ||
{ | ||
return HostVerifier::verify(gethostbyaddr($ip), $this->allowedHostNames); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/IstellaWebcrawlerVerifier.php → src/Webcrawler/TiscaliItaliaSpaVerifier.php
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
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,24 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
use WebcrawlerVerifier\Helper\Range; | ||
|
||
class TurnitinLLCVerifier implements VerifierInterface | ||
{ | ||
// https://www.turnitin.com/robot/crawlerinfo.html | ||
protected $allowedRanges = [ | ||
'38.111.147.69-38.111.147.94', | ||
'199.47.82.133-199.47.82.254' | ||
]; | ||
|
||
/** | ||
* Checks whether the given IP address really belongs to a valid host or not | ||
* | ||
* @param $ip string the IP address to check | ||
* @return bool true if the given IP belongs to any of the valid hosts, otherwise false | ||
*/ | ||
public function verify($ip) | ||
{ | ||
return Range::inRange($ip, $this->allowedRanges); | ||
} | ||
} |
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
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,20 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
use WebcrawlerVerifier\Helper\Range; | ||
|
||
class ValidatorW3OrgVerifier implements VerifierInterface | ||
{ | ||
protected $allowedRanges = ['128.30.52.0/24']; | ||
|
||
/** | ||
* Checks whether the given IP address really belongs to a valid host or not | ||
* | ||
* @param $ip string the IP address to check | ||
* @return bool true if the given IP belongs to any of the valid hosts, otherwise false | ||
*/ | ||
public function verify($ip) | ||
{ | ||
return Range::inRange($ip, $this->allowedRanges); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ebcrawler/WebcrawlerVerifierInterface.php → src/Webcrawler/VerifierInterface.php
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,7 +1,7 @@ | ||
<?php | ||
namespace WebcrawlerVerifier\Webcrawler; | ||
|
||
interface WebcrawlerVerifierInterface | ||
interface VerifierInterface | ||
{ | ||
public function verify($ip); | ||
} |
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/YahooWebcrawlerVerifier.php → src/Webcrawler/YahooIncVerifier.php
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
4 changes: 2 additions & 2 deletions
4
src/Webcrawler/YandexWebcrawlerVerifier.php → src/Webcrawler/YandexLLCVerifier.php
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
Oops, something went wrong.