I am trying to generate a email address that reads as no-reply@example.com.

Using the global base_url the output is http://example.com.

Is there another global, or some other easy solution, to remove the "http://", so that I get the string example.com?

Thanks in advance


Think you're looking for $_SERVER['HTTP_HOST']. Also see $base_path, $base_url, $base_root

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.