'.$settings['site_url'].
') wasn\'t found on the reciprocal links page ('.$recurl.')! Checking link N. $i...
If you don\'t require a reciprocal link
from this website please set reciprocal URL to http://nolink'
);
}
}
$url=str_replace('&','&',$url);
$recurl=str_replace('&','&',$recurl);
$description=pj_input($_POST['description'],'Please write a short description of your website!');
if (strlen($description)>200) {
problem('Description is too long! Description of your website is limited to 200 chars!');
}
$lines=@file($settings['linkfile']);
if (count($lines)>$settings['max_links']) {
problem('You have reached your maximum links limit!');
}
$replacement = "$name$settings[delimiter]$email$settings[delimiter]$title$settings[delimiter]$url$settings[delimiter]$recurl$settings[delimiter]$description\n";
if ($settings['add_to'] == 0) {
$replacement .= implode('',$lines);
$fp = fopen($settings['linkfile'],'wb') or problem('Couldn\'t open links file for writing! Please CHMOD all txt files to 666 (rw-rw-rw)!');
fputs($fp,$replacement);
fclose($fp);
}
else {
$fp = fopen($settings['linkfile'],'ab') or problem('Couldn\'t open links file for appending! Please CHMOD all txt files to 666 (rw-rw-rw)!');
fputs($fp,$replacement);
fclose($fp);
}
done('The URL '.$url.' was successfully added to your links page');
} // END addlink()
// START check()
function check() {
global $settings;
$lines=array();
$lines=file($settings['linkfile']);
$site_url =strtolower($settings['site_url']);
$i=1;
$rewrite=0;
echo <<
\n";
echo "-> Link URL: $url
\n";
if ($recurl == 'http://nolink')
{
echo 'No reciprocal link required!
';
echo '- - - - - - - - - - - - - - - - - - - - - - - - - - - -
\n";
}
echo '-> Opening and reading reciprocal URL ';
$html = @file_get_contents($recurl) or $html='NO';
if ($html == 'NO')
{
if (empty($_POST['docantopen']))
{
echo '
CAN\'T OPEN RECIPROCAL URL!
Owner (click on name for e-mail): '.$name.'
';
}
else
{
echo '
CAN\'T OPEN RECIPROCAL URL!
Removing link ...
';
unset($lines[$i-1]);
$rewrite=1;
}
}
else
{
$html=strtolower($html);
if (strstr($html,$site_url))
{
echo '
A link to '.$settings['site_url'].' was found!
';
}
elseif (empty($_POST['dowhat']))
{
echo '
LINK NOT FOUND!
Owner (click on name for e-mail): '.$name.'
';
}
else
{
echo '
LINK NOT FOUND!
Removing link ...
';
unset($lines[$i-1]);
$rewrite=1;
}
}
$i++;
echo '- - - - - - - - - - - - - - - - - - - - - - - - - - - -
DONE!