Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

February 7, 2011

1 Comment

PHP

[PHP] Parse/Extract Domain name from URL

Do you need to parse only domain from current URL ? If yes than you are at the right place to get the PHP Code. PHP has parse_url built in function to parse a url parameters. This function will parse the url into an array. You can easily get the domain name from whole url of your page using parse_url function