Код:
<?
$tvch=$_GET['tvch'];
$dayvs=$_GET['dayvs'];
$film=$_GET['film'];
$channel=$_GET['channel'];
$mdata=$HTTP_COOKIE_VARS["tvpr"];
$site_url=$_SERVER["HTTP_HOST"];
$surl=$_SERVER["HTTP_HOST"];
$sel=$_POST['sel'];
if(isset($sel))
{
$channels=$_POST['channels'];
$cs=count($channels);
for($i=0;$i<=$cs-1;$i++)
{
$tvs=$tvs."zzz";
$tvs=$tvs.$channels[$i]."xxx";
}
$site_urls=".".$site_url;
print "<script language=\"javascript\">
function Set_Cookie( name, value, expires, path, domain, secure )
{
var today = new Date();
today.setTime( today.getTime() );
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + \"=\" +escape( value ) +
( ( expires ) ? \";expires=\" + expires_date.toGMTString() : \"\" ) +
( ( path ) ? \";path=\" + path : \"\" ) +
( ( domain ) ? \";domain=\" + domain : \"\" ) +
( ( secure ) ? \";secure\" : \"\" );
}
Set_Cookie(\"tvpr\", \"\", 100000, \"\", \"$surl\", \"\");
Set_Cookie(\"tvpr\", \"$tvs\", 100000, \"\", \"$surl\", \"\");
window.location='index.php';
</script>";
}
if(empty($channel) && empty($film) && empty($dayvs) && empty($tvch)){$title_pages=file_get_contents("http://kin
oplaneta.net/ptv/title.php?site=$site_url");}
if(!empty($channel) && empty($film) && empty($dayvs) && empty($tvch)){$title_pages=file_get_contents("http://kin
oplaneta.net/ptv/title.php?channel=$channel&site=$site_url");}
if(empty($channel) && !empty($film) && empty($dayvs) && empty($tvch)){$title_pages=file_get_contents("http://kin
oplaneta.net/ptv/title.php?film=$film&site=$site_url");}
if(empty($channel) && empty($film) && !empty($dayvs) && empty($tvch)){$title_pages=file_get_contents("http://kin
oplaneta.net/ptv/title.php?dayvs=$dayvs&site=$site_url");}
if(empty($channel) && empty($film) && empty($dayvs) && !empty($tvch)){$title_pages=file_get_contents("http://ki
noplaneta.net/ptv/title.php?tvch=$tvch&site=$site_url");}
// $title_pages - В этой переменной содержится заголовок страницы, вы можете вставить его в html-код вашего сайта
print "<title>$title_pages</title>"; // -- обратите внимание на эту строку !!!
?>
<!-- Здесь Вы можете вставить html-шаблон "шапки" Вашего сайта -->
<?
if(empty($channel) && empty($film) && empty($dayvs) && empty($tvch)){$text=file_get_contents("http://kinoplanet
a.net/ptv/tv.php?site=$site_url&mdata=$mdata");}
if(!empty($channel) && empty($film) && empty($dayvs) && empty($tvch)){$text=file_get_contents("http://kinoplanet
a.net/ptv/tv.php?channel=$channel&site=$site_url&mdata=$mdata");
}
if(empty($channel) && !empty($film) && empty($dayvs) && empty($tvch)){$text=file_get_contents("http://kinoplanet
a.net/ptv/tv.php?film=$film&site=$site_url&mdata=$mdata");}
if(empty($channel) && empty($film) && !empty($dayvs) && empty($tvch)){$text=file_get_contents("http://kinoplanet
a.net/ptv/tv.php?dayvs=$dayvs&site=$site_url&mdata=$mdata");}
if(empty($channel) && empty($film) && empty($dayvs) && !empty($tvch)){$text=file_get_contents("http://kinoplane
ta.net/ptv/tv.php?tvch=$tvch&site=$site_url&mdata=$mdata");}
print "<div id=kinoplaneta.net><table align=center width=98%><tr><td>$text</td></tr></table
></div>";
?>
<!-- Здесь Вы можете вставить html-шаблон "хвоста" Вашего сайта -->