session_start(); ?>
if (isset($_POST['submit'])) {
if (!empty($_POST['captcha']) && strstr(strtolower($_SESSION[captchastr]),strtolower($_POST['captcha'])) && $_POST['url'] != "") {
if ($file = @file_get_contents($_POST['url'])) {
$found = 0;
echo '';
$file = explode("",$file);
foreach ($file as $line) {
$line = $line."";
$pattern = "#|>)(.*?)#";
preg_match_all($pattern,$line,$matches);
if (isset($matches[1][0])) {
$urls = $matches[1][0];
$texts = $matches[2][0];
}
if (!empty($urls) && !empty($texts) && !strstr($texts,"![]()
';
if (!empty($_POST['showtitle'])) { echo ''.$texts.''; }
if (!empty($_POST['showaddy'])) { echo ' '.$urls; }
if (!empty($_POST['showhtml'])) { echo ' HTML: '.strstr($line,'';
$found += 1;
}
if ($_POST['showlinks'] == "inbound") {
$domain = str_replace('http://','',$_POST['url']);
$domain = str_replace(strstr($domain,'/'),'',$domain);
$domain = trim(strtolower($domain));
if (strstr(strtolower($urls),$domain) || !strstr(strtolower($urls),'http://')) {
echo '';
if (!empty($_POST['showtitle'])) { echo ''.$texts.''; }
if (!empty($_POST['showaddy'])) { echo ' '.$urls; }
if (!empty($_POST['showhtml'])) { echo ' HTML: '.strstr($line,' | ';
$found += 1;
}
}
if ($_POST['showlinks'] == "outbound") {
$domain = str_replace('http://','',$_POST['url']);
$domain = str_replace(strstr($domain,'/'),'',$domain);
$domain = trim(strtolower($domain));
if (!strstr(strtolower($urls),$domain) && strstr(strtolower($urls),'http://')) {
echo '';
if (!empty($_POST['showtitle'])) { echo ''.$texts.''; }
if (!empty($_POST['showaddy'])) { echo ' '.$urls; }
if (!empty($_POST['showhtml'])) {
$htmlcode = strstr($line,'",">",$htmlcode);
echo ' HTML: '.$htmlcode;
}
echo ' | ';
$found += 1;
}
}
}
}
echo ' |
';
if ($found == 0) { echo "No links found matching your search."; }
}
else
{
echo "Error: Could not load URL - please check and try again!";
}
}
else
{
echo "Invalid image verification or no URL inputted!
";
}
}
?>