</body> </html> <?php exit; } } if (isset($_GET['bid'])) { if (!isset($_GET['encoded'])) { $_GET['encoded'] = "true"; } if ($_GET['encoded'] == "true") { $_GET['bid'] = @base64_decode($_GET['bid']); } $_GET['bid'] = @urldecode($_GET['bid']); $_GET['bid'] = @strip_tags($_GET['bid']); if (robots_allowed($_GET['bid'], "iDB-VerCheck") === false) { echo "Error cannot prase this site. :P "; /* Then we cant prase this site now*/ exit; die; } $ChkURL = parse_url($_GET['bid']); $HostIP = gethostbyname($ChkURL['host']); if ($_GET['vercheck'] == "newtype") { $actchange = preg_quote("act=view", '/'); $_GET['bid'] = preg_replace("/" . $actchange . "/i", "act=versioninfo", $_GET['bid']); if (function_exists("stream_context_create")) { $GetTitle = file_get_contents($_GET['bid'], false, $context); } else { $GetTitle = file_get_contents($_GET['bid']); }
function bli_is_link_present() { $page_url = $_POST['page_url']; $user_agent = 'NameOfAgent (' . get_site_url() . ')'; // Robots.txt check $yandex_allowed = robots_allowed($page_url, 'YandexBot'); $req_args = array('headers' => array('User-Agent' => $user_agent)); $response = wp_remote_post($page_url, $req_args); if (is_wp_error($response)) { $try_again = array('msg' => 'Oops, try again.'); wp_send_json($try_again); } // if ( is_array( $response ) ) { $body = isset($response['body']) ? $response['body'] : ''; if ('' === $body) { //TODO: try again } $return = array('body' => $body, 'page_url' => $page_url, 'robots' => $yandex_allowed); wp_send_json($return); }