Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get domain from url

$url = 'http://google.com/dhasjkdas/sadsdds/sdda/sdads.html';
$parse = parse_url($url);
echo $parse['host']; // prints 'google.com'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #domain #url
ADD COMMENT
Topic
Name
9+2 =