forked from blallo/rss-bridge
Warn when accessing a private page.
This commit is contained in:
parent
18c6f0126f
commit
9c78362fd7
1 changed files with 12 additions and 3 deletions
|
@ -80,6 +80,11 @@ class FB2Bridge extends BridgeAbstract {
|
||||||
if($pageID === null){
|
if($pageID === null){
|
||||||
echo <<<EOD
|
echo <<<EOD
|
||||||
Unable to get the page id. You should consider getting the ID by hand, then importing it into FB2Bridge
|
Unable to get the page id. You should consider getting the ID by hand, then importing it into FB2Bridge
|
||||||
|
EOD;
|
||||||
|
die();
|
||||||
|
} elseif($pageID == -1) {
|
||||||
|
echo <<<EOD
|
||||||
|
This page is not accessible without being logged in.
|
||||||
EOD;
|
EOD;
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -242,6 +247,10 @@ EOD;
|
||||||
|
|
||||||
$pageContent = file_get_contents($page, 0, $context);
|
$pageContent = file_get_contents($page, 0, $context);
|
||||||
|
|
||||||
|
if(strpos($pageContent, "signup-button") != false) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
//Get the page ID if we don't have a captcha
|
//Get the page ID if we don't have a captcha
|
||||||
$regex = "/page_id=([0-9]*)&/";
|
$regex = "/page_id=([0-9]*)&/";
|
||||||
preg_match($regex, $pageContent, $matches);
|
preg_match($regex, $pageContent, $matches);
|
||||||
|
|
Loading…
Reference in a new issue