You are here

function _parser_common_syndication_string_url_path in Feeds 7.2

Removes the path parts of an absolute URL.

Parameters

string $url: The absolute URL.

Return value

string The absolute URL with the path stripped.

1 call to _parser_common_syndication_string_url_path()
_parser_common_syndication_atom10_parse_base_url in libraries/common_syndication_parser.inc
Finds the base URL of an Atom document.

File

libraries/common_syndication_parser.inc, line 273
Downloading and parsing functions for Common Syndication Parser. Pillaged from FeedAPI common syndication parser.

Code

function _parser_common_syndication_string_url_path($url) {
  $pos = strpos($url, '/', strpos($url, '//') + 2);
  return $pos ? substr($url, 0, $pos + 1) : $url . '/';
}