Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<div>
<?php
blablabla
?>
</div>
<div class="center_bottom">
<div class="line1">
<h2 class="title">Добави сайт</h2>
<br></br>
<center>
<br>Добави сайт<br>
<form method="POST" action="">
<input type="text" name="linka" size="50"> <input type="submit" name="q" value="Добави">
</center>
<br></br>
<?php
include "function.php";
include "config.php";
if($_POST['q'])
{
$url=$_POST['linka'];
$url = str_replace("http://", "", $url);
$url = str_replace("www.", "", $url);
$url = explode("/", $url);
$url = $url[0];
$readfile =@file_get_contents("http://".$url,"r");
if($readfile)
{
$page = str_replace("'", '"', $readfile);
$page=strtolower($page);
$tags = getUrlData("http://".$url);
if (!transcoder_page($page))
{ echo die("Сайта не е добавен, не е засечена кодировка"); }
else
{
$charset = transcoder_page($page);
if(strlen($tags['title'])<3)
{
$tags['title']=$url;
}
else
{
$tags['title']=$tags['title'];
}
if($charset!="windows-1251")
{
$title=iconv ( $charset , "windows-1251" , $tags['title']);
$author=iconv ( $charset , "windows-1251" , $tags['metaTags']['author']['value']);
$keywords=iconv ( $charset , "windows-1251" , $tags['metaTags']['keywords']['value']);
$description=iconv ( $charset , "windows-1251" , $tags['metaTags']['description']['value']);
}
else
{
$title = $tags['title'];
$author = $tags['metaTags']['author']['value'];
$keywords = $tags['metaTags']['keywords']['value'];
$description = $tags['metaTags']['description']['value'];
}
$title=addslashes(htmlspecialchars($title));
$author=addslashes(htmlspecialchars($author));
$keywords=addslashes(htmlspecialchars($keywords));
$description=addslashes(htmlspecialchars($description));
$url=htmlspecialchars($url);
$title = str_replace("&", "&", $title);
$author = str_replace("&", "&", $author);
$keywords = str_replace("&", "&", $keywords);
$description = str_replace("&", "&", $description);
$url = str_replace("&", "&", $url);
$data=time();
if(duble_check($url))
{
$querygi="INSERT INTO `url` (`url`,`title`,`opisanie`,`data`,`avtor`,`dumi`) VALUES ('$url','$title','$description','$data','$author','$keywords')" or die ("Error, query failed5");
$ok=mysql_query($querygi, $db_conn);
if($ok)
{
echo '<META HTTP-EQUIV="refresh" CONTENT="0; URL=index.php">';
}
else
{
echo "Възникна грешка";
}
}
else
{
echo '<span style="color:black;"><h1>Този сайт вече е добавен</h1></span>';
}
}
}
else
{
echo '<span style="color:black;"><h1>Този сайт не съществува или е грешен</h1></span>';
}
}
?>
</td>
</tr>
<tr>
<td class="catBottom" height="28"> </td>
</tr>
</table>
<div class="date">
</div>
</div>
</div>
<div class="center_bottom">
<div class="line1">
<h2 class="title">Добави сайт</h2>
<br></br>
<center>
<br>Добави сайт<br>
<form method="POST" action="">
<input type="text" name="linka" size="50"> <input type="submit" name="q" value="Добави">
</form>
</center>
<br></br>
<?
include "function.php";
include "config.php";
if($_POST['q'])
{
$url=$_POST['linka'];
$url = str_replace("http://", "", $url);
$url = str_replace("www.", "", $url);
$url = explode("/", $url);
$url = $url[0];
$readfile =@file_get_contents("http://".$url,"r");
if($readfile)
{
$page = str_replace("'", '"', $readfile);
$page=strtolower($page);
$tags = getUrlData("http://".$url);
if (!transcoder_page($page))
{ echo die("Сайта не е добавен, не е засечена кодировка"); }
else
{
$charset = transcoder_page($page);
if(strlen($tags['title'])<3)
{
$tags['title']=$url;
}
else
{
$tags['title']=$tags['title'];
}
if($charset!="windows-1251")
{
$title=iconv ( $charset , "windows-1251" , $tags['title']);
$author=iconv ( $charset , "windows-1251" , $tags['metaTags']['author']['value']);
$keywords=iconv ( $charset , "windows-1251" , $tags['metaTags']['keywords']['value']);
$description=iconv ( $charset , "windows-1251" , $tags['metaTags']['description']['value']);
}
else
{
$title = $tags['title'];
$author = $tags['metaTags']['author']['value'];
$keywords = $tags['metaTags']['keywords']['value'];
$description = $tags['metaTags']['description']['value'];
}
$title=addslashes(htmlspecialchars($title));
$author=addslashes(htmlspecialchars($author));
$keywords=addslashes(htmlspecialchars($keywords));
$description=addslashes(htmlspecialchars($description));
$url=htmlspecialchars($url);
$title = str_replace("&", "&", $title);
$author = str_replace("&", "&", $author);
$keywords = str_replace("&", "&", $keywords);
$description = str_replace("&", "&", $description);
$url = str_replace("&", "&", $url);
$data=time();
if(duble_check($url))
{
$querygi="INSERT INTO `url` (`url`,`title`,`opisanie`,`data`,`avtor`,`dumi`) VALUES ('$url','$title','$description','$data','$author','$keywords')" or die ("Error, query failed5");
$ok=mysql_query($querygi, $db_conn);
if($ok)
{
echo '<META HTTP-EQUIV="refresh" CONTENT="0; URL=index.php">';
}
else
{
echo "Възникна грешка";
}
}
else
{
echo '<span style="color:black;"><h1>Този сайт вече е добавен</h1></span>';
}
}
}
else
{
echo '<span style="color:black;"><h1>Този сайт не съществува или е грешен</h1></span>';
}
}
?>
</td>
</tr>
<tr>
<td class="catBottom" height="28"> </td>
</tr>
</table>
<div class="date">
</div>
</div>
</div>