If it were sub domain based you could do this:
$logo = "default";
$sub_domain = explode('.', $_SERVER['HTTP_HOST']);
$sub_domain = str_replace("https://", "", $sub_domain); // Remove the https (or http)
if (count($sub_domain) > 2) {
if ($sub_domain[0] == "www") { // if non sub...