From: friendica Date: Wed, 2 May 2012 00:10:26 +0000 (-0700) Subject: improve handling of relative feed url's X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f24ffa8ef0bbda13c12f130a413a8660fff45493;p=friendica.git improve handling of relative feed url's --- diff --git a/include/Scrape.php b/include/Scrape.php index b20d7d6046..2272526009 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -282,7 +282,7 @@ function scrape_feed($url) { } } if(! $basename) - $basename = substr($url,0,strrpos($url,'/')) . '/'; + $basename = implode('/', array_slice(explode('/',$url),0,3)) . '/'; $items = $dom->getElementsByTagName('link');