I am working on it 4 nights. First I fitt Linkman into my Design. Then I translate it into german (so sorry about my bad spelling) and then i modifid the input box for the description into a textarea input box because I like to have descriptions up to 2000 signs.
It is working! But not raely.
If I enter a description in the textarea box and I use the Enter Butten it ist working. It shows the description in the end whithout an empty line, but this is ok for me. But ...
If a user writes the description for exampel in MS Word and copy past it or he use by a direkt input the Enter butten to tims and gets on this way an empty line the result of the description ist that he prints the description yust up to this point were is the empty line.
And then he creats empty links. Look to the Screenshot:

He creats one of this empty links for each empty line.
This is what ist written in the linkinfo.txt
Code: Select all
Stefan myemail@gmail.com Die alte Seite http://www.my-page.de http://www.my-page.de Jetzt schreibe ich hier mal was
und mache einen Abstatz.
und dann versuche ich das noch ein weiteres mal! 0 1
Stefan myemail@gmail.com Wohnmobil Reiseberichte http://www.my-page2.com http://www.my-page2.com Meine Seite, die trage ich zum Testen mal hier ein. Dann schaut das auch nicht ganz so leer aus. Das macht natürlich keinen Sinn sich selber aus seiner eigenen Linkliste zu verlinken und deswegen werde ich diese Verlinkung später, wenn sich das hier ein wenig mit Leben gefüllt hat, wieder löschen. Derzeit soll sie lediglich der Veranschulichung dienen wie so ein Eintrag ausschauen könnte. Ich freue mich auf viele Einträge. Eintragen könnt ihre eure Seiten indem ihr auf de3n Link "Link Eintragen" rechts ober- und unterhalb dieser Links klickt. Viel Spass und viel Erfolg. 0 3
The source from my form.html is:
Code: Select all
<head>
<title>Add a link</title>
<style type="text/css">
body, td, p {
background-color : #FFFFFF;
color : #000000;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 12px;
}
</style>
</head>
<body>
<form method="POST" action="addlink.php">
<table border="0">
<tr>
<td><b>Dein Name:</b></td>
<td><input type="text" name="name" size="40" maxlength="50"></td>
</tr>
<tr>
<td><b>E-mail:</b></td>
<td><input type="text" name="email" size="40" maxlength="50"></td>
</tr>
<tr>
<td><b>Website Titel:</b></td>
<td><input type="text" name="title" size="40" maxlength="50"></td>
</tr>
<tr>
<td><b>Website URL:<b></td>
<td><input type="text" name="url" maxlength="255" value="http://" size="40"></td>
</tr>
<tr>
<td><b>URL mit Backlink:</b></td>
<td><input type="text" name="recurl" maxlength="255" value="http://" size="40"></td>
</tr>
</table>
<p><b>Beschreibung deiner Seite: (Max. 2000 Zeichen mit Leerzeichen)</b><br>
<form action="textarea.htm">
<textarea input name="description" maxlength="2000" cols="50" rows="10"></textarea></p>
<p><input type="submit" value="Link hinzufügen"></p>
</form>
</body>
Code: Select all
<?php
/*******************************************************************************
* Title: LinkMan reciprocal link manager
* Version: 1.7 @ April 18, 2009
* Author: Klemen Stirn
* Website: http://www.phpjunkyard.com
********************************************************************************
* COPYRIGHT NOTICE
* Copyright 2004-2009 Klemen Stirn. All Rights Reserved.
*
* This script may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
*
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden. Using this code, in part or full,
* to create competing scripts or products is expressly forbidden.
*
* Obtain permission before redistributing this software over the Internet
* or in any other medium. In all cases copyright and header must remain
* intact. This Copyright is in full effect in any country that has
* International Trade Agreements with the United States of America or
* with the European Union.
*
* Removing any of the copyright notices without purchasing a license
* is illegal! To remove PHPJunkyard copyright notice you must purchase a
* license for this script. For more information on how to obtain a license
* please visit the site below:
* http://www.phpjunkyard.com/copyright-removal.php
*******************************************************************************/
define('IN_SCRIPT',1);
require('settings.php');
ini_set('user_agent', 'LinkMan '.$settings['verzija'].' by http://www.phpjunkyard.com');
/* Accepting any more links? */
$lines = @file($settings['linkfile']);
if (count($lines)>$settings['max_links'])
{
problem('Derzeit werden keine neuen Links akzeptiert. Entschuldigung, bitte versuche es später noch einmal!');
}
/* Check user input */
$name = pj_input($_POST['name'],'Bitte gebe deinen Namen ein!');
$email = pj_input($_POST['email'],'Bitte gebe deine E Mail Adresse ein!');
if (!preg_match('/([\w\-]+\@[\w\-]+\.[\w\-]+)/',$email))
{
problem('Bitte gebe eine gültige E Mail Adresse an!');
}
$title = pj_input($_POST['title'],'Bitte gebe einen Titel (Namen) für deine Webseite an!');
if (strlen($title)>50)
{
problem('Dein gewählter Webseitentitel ist zu lang. Der Webseitentitel ist auf 50 Zeichen beschränkt!');
}
$url = pj_input($_POST['url'],'Bitte gebe die URL deiner Webseite an!');
if (!(preg_match('/(http:\/\/+[\w\-]+\.[\w\-]+)/i',$url)))
{
problem('Bitte gebe eine gültige URL zu deiner Webseite an!');
}
$recurl = pj_input($_POST['recurl'],'Bitte gebe die URL an von der aus du myhomeismycar verlinkst!');
if (!(preg_match('/(http:\/\/+[\w\-]+\.[\w\-]+)/i',$recurl)))
{
problem('Bitte gebe eine gültige URL an von der aus du myhomeismycar verlinkst!');
}
/* Compare URL and Reciprocal page URL */
$parsed_url = parse_url($url);
$parsed_rec = parse_url($recurl);
if ($parsed_url['host'] != $parsed_rec['host'])
{
problem('Der Link zu myhomeismycar muss auf der Domän/Subdomän zu finden sein die Du hier eintragen möchtest.!');
}
$url = str_replace('&','&',$url);
$recurl = str_replace('&','&',$recurl);
$description = pj_input($_POST['description'],'Bitte schreibe eine kurze Beschreibung zu deiner Webseite!');
if (strlen($description)>2000)
{
problem('Die Beschreibug deiner Webseite ist zu lang. Sie ist auf 2000 Zeichen limitiert!');
}
/* Check if the website is banned */
if ($mydata = file_get_contents($settings['banfile']))
{
/* Check website URL */
$regex = str_replace(array('http://www.','http://'),'http://(www\.)?',$url);
$regex = preg_replace('/index\.[^\/]+$/','',$regex);
$regex = str_replace('/','\/',rtrim($regex,'/'));
$regex = '/'.$regex.'\/?(index\.[^\/]+)?/i';
if (preg_match($regex,$mydata))
{
problem('Die von dir eingetragene Webseite wurde permanet aus dem Linktauschprogramm gebannt!');
}
/* Check reciprocal link URL */
$regex = str_replace(array('http://www.','http://'),'http://(www\.)?',$recurl);
$regex = preg_replace('/index\.[^\/]+$/','',$regex);
$regex = str_replace('/','\/',rtrim($regex,'/'));
$regex = '/'.$regex.'\/?(index\.[^\/]+)?/i';
if (preg_match($regex,$mydata))
{
problem('Diese Webseite wurde permanent aus dem Linktauschprogramm gebannt!');
}
unset($mydata);
}
/* Check title and description for possible spam problems */
eval(gzinflate(base64_decode('DVe1ssXIFfwc75YCMZUjMTPfxCVmZn29Xz5Q09N0yisd/qm/dq
qG9Cj/ydK9JLD/FWU+F+U//xF/Obzvobb3kQwBgMjzohgh6jhcJv8xjwydHZhlpeEN788idlIC6eUaif
MB3h3cx29+tRt8zy1px60C8W9Zr5J5sFa0YxPWQc9qOqu2tTZPHnZx7tyHR+BUED+BSUFME86GyBVWrV
/b7+QrstzCGV7uXnDEdik4N2yUkzdVOTfp56ltF40JEAVbVGkrjJvbAvlqQrodQ4UaCMzJQ9l6LVilNX
MtNeW+G7DBjDhi58Ms8Vy46zti+Uc1zM5n4WjllE9jl8m3n1NLMTe7tsdHjO8YUTmigQR75beqiHt6S+
ZKCoybiRxpCRzLUwC7C/Go+HBEBvzV36xqW/Fq/+1zfmy9WR65t+nGsfkJHKW1RX3TAOKYWi548jd6WS
uLypXwVB8b/TBAjZtzyCbWdoCS4SybdEC0wdNog7pN+zZgtSMu+VJR/9pgOQJQ8V6JLEfAER6GMDKhJ2
hbKRk5PNYYz1UQvnYwlWAZUjNjcfeAWfqzRljDlAnrkQpDwocfSV3jDfBwFpGPxTN2OIxJJSWWeoN15c
XttLE0sWGdIzBzAXHKBCDF34krQQU3NfDec4yZqVH26UpK0HMaAQl3sUf05eXZppJQ+HZpiBwkiEuMzJ
0FyogUWUtctomBJwiFQ8zLexF6Ox4ZwQ1JeGHFvvaZrgx4OqJ+Z10EaktfdUlkVbRxwWuey1N9hDVoiT
tUyW7b55rMzadAOx3Yg5nCw94fJzJI4C9snBcn6vXebaQvzzCaPMbWQIZFTo13uLNTYUlomive5T83Tl
lMuJ1E23u677ALA4+whWpTAJrPtTxdLMnqwPBUIdRyeXZI8uCC4HRphRvLUrEa+j3XmhNOeHcKx5XCa1
lWmk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OCqD9fNjEwRrqvsNAHo5bSY1/oI0TYu8Z7KKq9iQKCcWGyVSj/GE4Yvz3V5ULMe
ph6E3i0hNmvgM1eA1UJq+UkQeX506m2wk0H1muBlp7odWL6JGgQjRcLjKfejoOETb9Ek/tOdGlnwz/Nh
Wqnsf+Qeksc0qygEiRSW6+UT/f2AQbC1++OUehsfk7XVDdGzH/HLTyAPuDeiJXVPKewFkE0Iw5fqnIll
7anlqaIvpfa3bYnzGUdmYAuATW5JU/DPiLpCsLQirLCzCDwHG6f1BR+BWYVZJUz++kz8XmnuoDTiuCRY
HJ486fHyff/OujLib0ux2AWFcWne9NQxQ3tyJKpdUboIR5OuWKtFHTq+QwyilgfMlER97bo01zM4Ofpx
NzJ06UjalU1lBF22xH8IR91DWYitnWJ9w6tAAvo1yjVHMyO9OMZ30IBuQnrbaHbLH5wU0+mYYqF+o1x4
TRMUbQDJm1P7zxv/aVylpUdiR9MaWoUrWCh2HmUxAROL3JFi/I9j4nOZ1+BQSlCSuIPaj4Wn9zRS+BMr
KI2l6CeGFVt1N2HkliXvlSSaNWNgflxt+87UFNFOndUqducUmgAqL8L4KjQANmlGslBFV5z+VySn/TlG
5J/QRJ4S3tNzrA/bmCylPhX+HBTneAq8InUiJGZYN0lpWhsXAgdmSizFiOKHiaJcRc7R4rm7zA23ShAA
aRdB3DiO7xHV/we+Jzg2FZ3jC2i3bmLjUBYqNju9hLulDVb/jXsqRjHJk+tMnANdr41f5EKIdcZ3Dxsz
J9InCDNy1ZmrGie22l127Wus5JLp0Jg18teNnXBYIADVLsf/7999///h8=')));
if ($settings['spam_filter'])
{
$test = pj_checkTitleDesc($title, $description, $url, $settings['superlatives']);
if ($test === true)
{
$test = '';
}
elseif ($test == 'superlatives')
{
problem('Bitte benutze keine Supperlative wie tollste, beste, gößte in Titel und Beschreibung deiner Webseite!');
}
elseif ($test == 'text')
{
problem('Dein Link hat den SPAM Test nicht bestanden, ich kann ihn leider nicht annehmen. Bei Rückfragen Kontaktiere mich bitte über mein Kontaktformular.');
}
elseif ($test == 'url')
{
problem('Dein Link hat den SPAM Test nicht bestanden, ich kann ihn leider nicht annehmen. Bei Rückfragen Kontaktiere mich bitte über mein Kontaktformular.');
}
}
if ($settings['autosubmit'])
{
session_start();
if (empty($_SESSION['checked']))
{
$_SESSION['checked'] = 'N';
$_SESSION['secnum'] = rand(10000,99999);
$_SESSION['checksum'] = $_SESSION['secnum'].$settings['filter_sum'].date('dmy');
}
if ($_SESSION['checked'] == 'N')
{
print_secimg();
}
elseif ($_SESSION['checked'] == $settings['filter_sum'])
{
$_SESSION['checked'] = 'N';
$secnumber = pj_isNumber($_POST['secnumber']);
if(empty($secnumber))
{
print_secimg(1);
}
if (!check_secnum($secnumber,$_SESSION['checksum']))
{
print_secimg(2);
}
}
else
{
problem('Interner script error. Falsche Sitzungs Parameter!');
}
}
/* Check for duplicate links */
if ($settings['block_duplicates'])
{
$mydata = file_get_contents($settings['linkfile']);
/* Check website URL */
$regex = str_replace(array('http://www.','http://'),'http://(www\.)?',$url);
$regex = preg_replace('/index\.[^\/]+$/','',$regex);
$regex = str_replace('/','\/',rtrim($regex,'/'));
$regex = '/'.$regex.'\/?(index\.[^\/]+)?\s/i';
if (preg_match($regex,$mydata))
{
problem('Bitte trage ein und die Gleiche Seite nicht mehrfach ein!');
}
/* Check reciprocal link URL */
$regex = str_replace(array('http://www.','http://'),'http://(www\.)?',$recurl);
$regex = preg_replace('/index\.[^\/]+$/','',$regex);
$regex = str_replace('/','\/',rtrim($regex,'/'));
$regex = '/'.$regex.'\/?(index\.[^\/]+)?\s/i';
if (preg_match($regex,$mydata))
{
problem('Bitte versuche nicht mehrere Webseiten mit ein und dem gleichen Rücklink einzutragen!');
}
unset($mydata);
}
/* Get HTML code of the reciprocal link URL */
$html = @file_get_contents($recurl) or problem('Can\'t open remote URL!');
$html = strtolower($html);
$site_url = strtolower($settings['site_url']);
/* Block links with the meta "robots" noindex or nofollow tags? */
if ($settings['block_meta_rob']==1 && preg_match('/<meta([^>]+)(noindex|nofollow)(.*)>/siU',$html,$meta))
{
problem(
'Bitte plaziere den Link zu myhomeismycar nicht auf einer Seite mit den meta Angaben noindex oder nofollow:<br />'.
htmlspecialchars($meta[0])
);
}
$found = 0;
$nofollow = 0;
if (preg_match_all('/<a\s[^>]*href=([\"\']??)([^" >]*?)\\1([^>]*)>/siU', $html, $matches, PREG_SET_ORDER)) {
foreach($matches as $match)
{
if ($match[2] == $settings['site_url'] || $match[2] == $settings['site_url'].'/')
{
$found = 1;
if (strstr($match[3],'nofollow'))
{
$nofollow = 1;
}
break;
}
}
}
if ($found == 0)
{
problem(
'Meine URL (<a href="'.$settings['site_url'].'">'.$settings['site_url'].
'</a>) wurde nicht auf der von dir angegebenen Seite (<a href="'.$recurl.'">'.
$recurl.'</a>)gefunden!<br><br>Bitte vergewissere dich den Backlink korreckt eingefügt zu haben und gebe die Seite an auf der er zu finden ist'
);
}
/* Block links with rel="nofollow" attribute? */
if ($settings['block_nofollow'] && $nofollow == 1)
{
problem('Bitte nutze nicht das rel="nofollow" Link attribute für den Link auf myhomeismycar auch du bekommst dofollow!');
}
/* Check Google PageRank */
if ($settings['show_pr'] || $settings['min_pr'] || $settings['min_pr_rec'])
{
require('pagerank.php');
$pr = getpr($url);
$pr = empty($pr) ? 0 : $pr;
if ($settings['min_pr'] && ($pr < $settings['min_pr']))
{
problem('Derzeit können sich nur Webseiten mit dem Google PageRank '.$settings['min_pr'].'/10 oder höher eintragen. Bitte versuche es in einigen Monaten noch einmal.');
}
if ($settings['min_pr_rec'])
{
$pr_rec = getpr($recurl);
$pr_rec = empty($pr_rec) ? 0 : $pr_rec;
if ($pr_rec < $settings['min_pr_rec'])
{
problem('Bitte plaziere den Backlink auf<a href="'.$settings['site_url'].'">'.$settings['site_url'].'</a> auf einer Seite mit dem Google PageRank '.$settings['min_pr_rec'].'/10 oder höher.');
}
}
}
$replacement = "$name$settings[delimiter]$email$settings[delimiter]$title$settings[delimiter]$url$settings[delimiter]$recurl$settings[delimiter]$description$settings[delimiter]0$settings[delimiter]$pr\n";
/* Approve manually */
if ($settings['man_approval'])
{
$tmp = str_replace('www.','',strtolower($parsed_url['host']));
$tmp = md5($tmp.$settings['filter_sum']);
$tmp_file = 'apptmp/'.$tmp.'.txt';
if (file_exists($tmp_file))
{
problem('Dieser Link wartet bereits auf Moderation!');
}
$fp = fopen($tmp_file,'w') or problem('Couldn\'t open temporary file for writing! Please CHMOD the apptmp folder to 777 (rwxrwxrwx)!');
flock($fp, LOCK_EX);
fputs($fp,$replacement);
flock($fp, LOCK_UN);
fclose($fp);
$message = "Hello,
A new link is awaiting approval for your links page at $settings[site_url]
Link details:
Name: $name
E-mail: $email
URL: $url
Reciprocal link: $recurl
Title: $title
Description:
$description
To APPROVE the link visit this URL:
$settings[url_approval]?id=$tmp&approve=1
To REJECT the link visit this URL:
$settings[url_approval]?id=$tmp&approve=0
End of message
";
$headers = "From: $name <$email>\n";
$headers .= "Reply-To: $name <$email>\n";
mail($settings['admin_email'],'New link waiting approval',$message,$headers);
require_once('header.txt');
?>
<p align="center"><b>Your link submitted for approval!</b></p>
<p> </p>
<p align="center">Thank you, your link has been submitted for approval and will appear on the links page once approved by the administrator!</p>
<p> </p>
<p> </p>
<p align="center"><a href="<?php echo $settings['site_url']; ?>">Back to the main page</a></p>
<?php
require_once('footer.txt');
exit();
}
/* Approve automatically */
else
{
if ($settings['add_to'] == 0)
{
/* Make sure new link is added after any featured ones */
$i = 0;
$was_added = 0;
foreach ($lines as $thisline)
{
list($name2,$email2,$title2,$url2,$recurl2,$description2,$featured2,$pr2)=explode($settings['delimiter'],$thisline);
$featured2 = $featured2 ? 1 : 0;
if ($featured2 == 0)
{
$lines[$i] = $replacement . $thisline;
$was_added = 1;
break;
}
$i++;
}
if ($was_added)
{
$replacement = implode('',$lines);
$fp = fopen($settings['linkfile'],'w') or problem('Couldn\'t open links file for writing! Please CHMOD all txt files to 666 (rw-rw-rw)!');
flock($fp, LOCK_EX);
fputs($fp,$replacement);
flock($fp, LOCK_UN);
fclose($fp);
}
else
{
$fp = fopen($settings['linkfile'],'a') or problem('Couldn\'t open links file for appending! Please CHMOD all txt files to 666 (rw-rw-rw)!');
flock($fp, LOCK_EX);
fputs($fp,$replacement);
flock($fp, LOCK_UN);
fclose($fp);
}
}
else
{
$fp = fopen($settings['linkfile'],'a') or problem('Couldn\'t open links file for appending! Please CHMOD all txt files to 666 (rw-rw-rw)!');
flock($fp, LOCK_EX);
fputs($fp,$replacement);
flock($fp, LOCK_UN);
fclose($fp);
}
if($settings['notify'] == 1)
{
$message = "Hello,
Someone just added a new link to your links page on $settings[site_url]
Link details:
Name: $name
E-mail: $email
URL: $url
Reciprocal link: $recurl
Title: $title
Description:
$description
End of message
";
$headers = "From: $name <$email>\n";
$headers .= "Reply-To: $name <$email>\n";
mail($settings['admin_email'],'New link submitted',$message,$headers);
}
require_once('header.txt');
?>
<p align="center"><b>Dein Link wurde eingetragen</b></p>
<p> </p>
<p align="center">Dein Link wurde erfolgreich in die Linkliste eingetragen. Bitte verwende den Zurück Butten deines Browsers oder steuer die Linkliste manuel über die linke Seitennavigation an um ihn zu betrachten.</p>
<p> </p>
<p> </p>
<?php
require_once('footer.txt');
exit();
}
/*** FUNCTION ***/
function problem($problem) {
require_once('header.txt');
echo '
<p align="center"><font color="#FF0000"><b>ERROR</b></font></p>
<p> </p>
<p align="center">'.$problem.'</p>
<p> </p>
<p align="center"><a href="javascript:history.go(-1)">Zurück zur vorherigen Seite</a></p>
';
require_once('footer.txt');
exit();
}
function print_secimg($message=0) {
global $settings;
$_SESSION['checked']=$settings['filter_sum'];
require_once('header.txt');
?>
<p> </p>
<p align="center"><b>Anti-SPAM check</b></p>
<div align="center"><center>
<table border="0">
<tr>
<td>
<form action="addlink.php?<?php echo strip_tags(SID); ?>" method="POST" name="form">
<hr>
<?php
if ($message == 1)
{
echo '<p align="center"><font color="#FF0000"><b>Bitte gebe die Sicherheitsnummer ein</b></font></p>';
}
elseif ($message == 2)
{
echo '<p align="center"><font color="#FF0000"><b>Falsche Sicherheitsnummer. Bitte versuche es noch einmal.</b></font></p>';
}
?>
<p>Dies ist ein Sicherheitschek der automatische Einträge verhindern soll.(SPAM).
Bitte gebe die Sicherheitsnummer in das Feld ein und drücke auf Weiter</p>
<p> </p>
<p>Security number: <b><?php echo $_SESSION['secnum']; ?></b><br>
Bitte gebe die Sicherheitsnummer ein:
<input type="text" size="7" name="secnumber" maxlength="5"></p>
<p>
<?php
foreach ($_POST as $k=>$v)
{
if ($k == 'secnumber')
{
continue;
}
echo '<input type="hidden" name="'.htmlspecialchars($k).'" value="'.htmlspecialchars(stripslashes($v)).'">';
}
?>
</p>
<p align="center"><input type="submit" value=" Continue "></p>
<hr>
</form>
</td>
</tr>
</table>
</center></div>
<p> </p>
<p> </p>
<?php
require_once('footer.txt');
exit();
}
function check_secnum($secnumber,$checksum) {
global $settings;
$secnumber .= $settings['filter_sum'].date('dmy');
if ($secnumber == $checksum)
{
unset($_SESSION['checked']);
return true;
}
else
{
return false;
}
}
?>
If I get it running, I buy you a drink. Yust a smal one, but a drink
