use $REX['SERVER'] instead of $_SERVER['HTTP_HOST']

closes #123
check php version, closes #124