- keywords as $keywords):?> - $keywords";?> +
+ keywords as $keywords):?> + $keywords";?> + +
+ + type == 'url') + { + $url = $doc->content; + if(!preg_match('/^https?:\/\//', $doc->content)) $url = 'http://' . $url; + $urlIsHttps = strpos($url, 'https://') === 0; + $serverIsHttps = ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') or (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')); + + if(($urlIsHttps and $serverIsHttps) or (!$urlIsHttps and !$serverIsHttps)) + { + echo ""; + } + else + { + $parsedUrl = parse_url($url); + $urlDomain = $parsedUrl['scheme'] . '://' . $parsedUrl['host']; + + $title = ''; + $response = common::http($url); + preg_match_all('/