Det vore mycket lättare att läsa om du använt code-taggen.
Jag håller på en liten bookmarks: http://lankbase.linkeater.tk
men den är ej seo vänlig, hur gör jag om,redict.php så det blir seo vänligt??
Koden ser ut så här:
<?php
/* $Id: redirect.php,v 1.12 2005/10/19 07:12:35 dbu Exp $
Task: increment the 'hit counter' of the right link and redirect the user to
the correct URL
LinkBase
A web application (written in PHP) that helps to manage the Internet bookmarks
of an organisation (such as a company, a school...) by centralizing those
links in a single multi-user database (SQL). You can then access this base
with a web browser.
Copyright (C) 2003-2005 David BUCHMANN <budda@budda.ch>
Copyright (C) 2001-2003 Jean HAUSSER <jhausser@tuxfamily.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
error_reporting(E_ALL); //fixme: only for debugging
require_once('inc/common.inc.php');
//calls a function in common.inc.php which does initialization, sanity check and session management
$lb_error = lb_init();
if ($lb_error) {
echo '<html><head><title>Error</title></head>'.
'<body><p>Severe configuration error: '.$lb_error.
'</p></body></html>';
exit();
}
if ( isset($_REQUEST['id']) ) {
//this is no method, so global is not needed, but for info:
//global $lb_session, $lb_config, $lb_lang, $lb_linkdb;
if (! $lb_session->canView($lb_linkdb->getOwnerOfLink($_REQUEST['id']))) {
echo '<html><head><title>Error</title></head><body>';
echo $lb_theme->error($lb_lang['access_denied_error']);
echo '</body></html>';
exit();
}
$link = $lb_linkdb->getLink($_REQUEST['id']);
if ( ! $link ) {
echo '<html><head><title>Error</title></head><body>';
echo $lb_theme->error($lb_lang['displink_error']);
echo '</h1></body></html>';
exit();
}
$is_down = ($link['down_since'] > 0);
$check_needed = ( ( time() - $link['last_checked']) / (60*60*24) >=
$lb_config['url_check_interval'] );
if ($check_needed || $is_down) {
$is_down = ! $lb_linkdb->checkUrl($_REQUEST['id'], $link[6], $link[9], true);
}
if (! $is_down ) {
$lb_linkdb->updateLinkHits($link['id']);
if (strstr($link\['url'\], ';') === FALSE) {
header('Location: '. $link\['url'\]); // redirect to the website
echo '\<html\>\<head\>\<title\>LinkBase Redirect\</title\>\</head\>\<body\>';
} else {
//do no automatic redirect for unicode urls. they are encoded as html, thus would have a ; in the location: header, which the browser does not like.
echo '\<html\>\<head\>\<title\>LinkBase Redirect\</title\>';
echo '\<meta http-equiv="REFRESH" content="0;url='.$link\['url'\]. '"\>';
echo '\</head\>\<body\>';
}
echo '\<a href="'.$link\['url'\].'"\>'.$link\['title'\].'\</a\>'.
'\</body\>\</html\>';
} else { // a unsuccessful check was performed
echo '\<html\>\<head\>\<title\>LinkBase\</title\>\</head\>\<body\>'.
'\<a href="'.$link\['url'\].'"\>'.$link\['title'\].'\</a\> '.$lb_lang\['site_down'\].' '.
$lb_config\['url_check_maxdowntime'\].' '.$lb_lang\['days'\].
'\</body\>\</html\>';
}
} else {
header('Location: ./'); //no link specified, go to index
}
?>
**
nån som vore bussig och kan hjälpa mig??


