billboard1

Check If Domain is Subdomain in PHP

 Hello Friends, If you are seeking to get a code for checking Domain is subdomain or now now no longer in PHP than you are at right place and you could get working code as always. Using PHP, you could check if your place is subdomain or now now no longer. You absolutely need to call under function and byskip subdomain url and you could get a actual or faux in move returned counting on result. Below is the function which split place name and check for if place is subdomain or now now no longer. If your most important place incorporates terms like .co.uk or .com.au and lots of others and lots of others than trade the number “2″ to “3″ in if condition.

function check_subdomain($subdomain) {

$subdomainarr = explode(‘.’, $subdomain);

if(count($subdomainarr) > 2) {
return true;
} else {
return false;
}
}
$current_domain = $_SERVER['HTTP_HOST'];
if(check_subdomain($current_domain)) {
echo ‘Yes, This is Subdoamin.’;
} else {
echo ‘Sorry, this is not a subdomain.’;
}
Check If Domain is Subdomain in PHP, Check Subdomain in PHP, Validate Subdomain in PHP, Checking whether or not or now no longer Domain is subdomain, Subdomain Validation in PHP, Create Subdomain Dynamically, Delete Subdomain Dynamically

No comments:

Post a Comment

How to Add Google+ Verified Authorship to your WordPress Blog?

Nowadays everybody is aware of that how the hunt is getting social on net. Google + has emerged as a platform for bloggers to come upon at t...

Contact Form

Name

Email *

Message *