<?php

include_once('/home/admin/web/uploadbox.co/public_html/core/includes/master.inc.php');
include('functions.php');

if(empty($_POST)) 
{
	exit("Direct access not allowed");
}
	
$pluginConfig = pluginHelper::pluginSpecificConfiguration('linkchecker');
$plugin_settings = json_decode($pluginConfig['data']['plugin_settings'], true);
if ($plugin_settings)
{
	$max = $plugin_settings['linksMax'];
}
$links		= trim($_REQUEST['tocheck']);
$linksAr	= explode("\n", $links);
$Subject	= array_filter($linksAr, 'trim');
$i			= 1;	
foreach($Subject as $toCheck)
{
	if($i > $max) 
	break;
	echo checkLinks($toCheck);
	echo '<br />';
	$i++;
}

?>