![]() |
Hostname Regex
Hey, it's been a while :-P
Kinda have a small issue. I'm trying get the actual hostname of a domain the problem i face is subdomains. For example, i'm trying to produce a regex that could at least get all the follow to result in domain.com: sub.domain.com domain.co.uk domain.com sub.domain.co.uk sub.sub.domain.gov.uk etc.. Any ideas? Thanks! ^^ |
are you trying to get the hostnames of your website or all the hostnames that have your word (in this example 'domain') from the Internet?
|
Just a hostname, they are purely examples. The "domain" part could be anything.
|
You could use the parse_url() function built into PHP to fetch the domain name =)
PHP Code:
|
| All times are GMT. The time now is 05:26 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0