ciber Posted June 27, 2010 Share Posted June 27, 2010 I want to extract the path from a url string, how do I do this?? I included an example below to describe what I mean. input : http://www.remotesite.com/images/folder/image.jpg php magic happens output : /images/folder/image.jpg thanks. Link to comment https://forums.phpfreaks.com/topic/206007-get-file-path-from-url-string/ Share on other sites More sharing options...
Alex Posted June 27, 2010 Share Posted June 27, 2010 echo parse_url('http://www.remotesite.com/images/folder/image.jpg', PHP_URL_PATH); parse_url Link to comment https://forums.phpfreaks.com/topic/206007-get-file-path-from-url-string/#findComment-1077965 Share on other sites More sharing options...
ciber Posted June 27, 2010 Author Share Posted June 27, 2010 tks Link to comment https://forums.phpfreaks.com/topic/206007-get-file-path-from-url-string/#findComment-1077969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.