Hi,
Does anyone know how to extract the domain name from the config files?
So from domain
http://abc.com - I just want abc
I can’t seem to do this from the config files below - I could hack around in php and write something to break up the string etc, but just wondering if there was a quicker way?
Thanks
MODx configuration
$site_name=$modx->config[’site_name’];
$site_url=$modx->config[’site_url’];
$site_start=$modx->config[’site_start’];
$error_page=$modx->config[’error_page’];
$base_path=$modx->config[’base_path’];
$base_url=$modx->config[’base_url’];
$rb_base_dir=$modx->config[’rb_base_dir’];
$rb_base_url=$modx->config[’rb_base_url’];
$modx_charset=$modx->config[’modx_charset’];