private function FeedsCrawler::baseUrl in Feeds Crawler 6.2
Same name and namespace in other branches
- 7 FeedsCrawler.inc \FeedsCrawler::baseUrl()
Breaks a url up removing everything but the http://example.com.
1 call to FeedsCrawler::baseUrl()
File
- ./
FeedsCrawler.inc, line 123 - Home of the FeedsCrawler.
Class
- FeedsCrawler
- Fetches data via HTTP.
Code
private function baseUrl($url) {
$p = parse_url($url);
$output = '';
$output .= isset($p['scheme']) ? $p['scheme'] : 'http';
$output .= '://';
$output .= isset($p['user']) ? $p['user'] : '';
$output .= isset($p['pass']) ? ':' . $p['pass'] : '';
$output .= isset($p['user']) ? '@' : '';
$output .= $p['host'];
$output .= isset($p['port']) ? ':' . $p['port'] : '';
return $output;
}