![]() |
php question
wanting to store sitename as a php variable.
if url was www somesitename .com i want my page to pull "somesitename" and store as php variable, without the www or the .com any thoughts? |
where is it pulling 'somesitename' from? from the url it's located at?
Code:
<? $somesitename = $_SERVER['SERVER_NAME']; |
Code:
$domain_strip = preg_replace("/^(.*\.)?([^.]*\..*)$/", "$2", $_SERVER['HTTP_HOST']); |
Quote:
Try: Code:
echo parse_url($u,PHP_URL_HOST); |
Quote:
|
All times are GMT -7. The time now is 09:17 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc