DelphinPRO пишет: код уже выложите может быть?
К сожалению не могу выложить полный код:
$page = 'http://'.$_SERVER['HTTP_HOST'].($_SERVER['SERVER_PORT']==80?'':':'.$_SERVER['SERVER_PORT']).$_SERVER['REQUEST_URI'];
$res = mysql_query('SELECT * FROM '.$tableprefix.'seo_links_cache JOIN '.$tableprefix.'seo_links_links ON '.$tableprefix.'seo_links_cache.link_id='.$tableprefix.'seo_links_links.id WHERE url="'.mysql_escape_string($page).'"',$db);
if(!$res || mysql_numrows($res)==0)
{
$res = mysql_query('SELECT DISTINCT * FROM '.$tableprefix.'seo_links_links WHERE href!="'.mysql_escape_string($page).'" ORDER BY rand() LIMIT '.$count,$db);
while($row=mysql_fetch_assoc($res))
{
if($encoding_from!=$encoding_to)
{
$row['href'] = iconv($encoding_from,$encoding_to,$row['href']);
$row['text'] = iconv($encoding_from,$encoding_to,$row['text']);
}
mysql_unbuffered_query('INSERT INTO '.$tableprefix.'seo_links_cache (link_id,url) VALUES ('.$row['id'].',"'.mysql_escape_string($page).'")',$db);
echo '<a style="padding:4px;" href="'.$row['href'].'">'.$row['text'].'</a>, ';
(Добавление)
Ну так господа кодеры, кто нить подскажет куда копать?
|