Hi all, Can anyone tell me the the name of the fuction that strips a URL, for example, http://www.site.com/folder/image.gif to just http://www.site.com
Cheers, maccam
Try this:
<? $url = "http://www.site.com/folder/image.gif"; print substr($url, 0, strpos($url, '/', strlen('http://'))); ?>
Diego
Or just use parse_url() and pick out the bits you want.