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.
кажи как става плсNetCutter каза:Това го има вече и в повечето фрий хостове и е доста лесно :wink:
От там в cPanel си има меню за тях :wink:NetCutter каза:Който иска безплатен хост да идва в Тоя форум да напише 10 мнения във форума,после попълва този формуляр и се кефи на адцкото място,като цената е само по даден брой постове на месец :wink:
ти не ме разбра искам да правят в сайта ми товаNetCutter каза:От там в cPanel си има меню за тях :wink:NetCutter каза:Който иска безплатен хост да идва в Тоя форум да напише 10 мнения във форума,после попълва този формуляр и се кефи на адцкото място,като цената е само по даден брой постове на месец :wink:
<?
global $domainname;
global $subdomainname;
$domainarray = explode('.', $_SERVER['HTTP_HOST']);
$index=count($domainarray)-1;
$domainname= $domainarray[$index-1].".".$domainarray[$index];
$subdomainname="";
for($i=0;$i<$index-1;$i++)
{
if($subdomainname=="")
{
$subdomainname=$domainarray[$i];
}
else
{
$subdomainname=$subdomainname.".".$domainarray[$i];
}
}
ShowCustomizedPageForSubDomain($subdomainname);
?>
This function ShowCustomizedPageForSubDomain($subdomainname) can be easily implemented in two ways:
1) Either your store Page's Html in your database and all this function would do is to pick up that html code for the provided sub-domain from the database and simply
"echo" or "print" it.
2) or you can simply have standard actual pages for each subdomain and you simply include them here like this
ob_start();
include "http://url_of_the_page_you_want_to_show";
$data=ob_get_contents();
ob_clean();
this Object buffer will return you that page's content in the variable "$data"; you simply echo $data;
hmm , going more deep, Second Implementation of your function is like this
function ShowCustomizedPageForSubDomain($subdomainname)
{
ob_start();
include "http://url_of_the_page_you_want_to_show_for_this_subdomain";
$data=ob_get_contents();
ob_clean();
echo $data;
}