I have a domain name say for example : www.example.com I would like to get a dynamic data using PHP that is after this domain name. Example : www.example.com/samsung
Use parse_url. See also this answer