Filter results by user status (VIP/Trusted/None)
Took into account LogMANOriginal comment and tested it, everything's working.
This commit is contained in:
parent
8bb002c7b6
commit
8b52b3858e
1 changed files with 2 additions and 10 deletions
|
@ -108,16 +108,8 @@ class ThePirateBayBridge extends BridgeAbstract{
|
||||||
|
|
||||||
|
|
||||||
foreach($html->find('tr') as $element) {
|
foreach($html->find('tr') as $element) {
|
||||||
$skip = FALSE;
|
|
||||||
|
if ( !$trustedBool or !is_null($element->find('img[alt=VIP]', 0)) or !is_null($element->find('img[alt=Trusted]', 0)) )
|
||||||
if ($trustedBool)
|
|
||||||
{
|
|
||||||
$element_str = (string)$element;
|
|
||||||
if (strpos($element_str, 'VIP') == FALSE and strpos($element_str, 'Trusted') == FALSE )
|
|
||||||
$skip = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $skip == FALSE )
|
|
||||||
{
|
{
|
||||||
$item = array();
|
$item = array();
|
||||||
$item['uri'] = $element->find('a',3)->href;
|
$item['uri'] = $element->find('a',3)->href;
|
||||||
|
|
Loading…
Reference in a new issue