public function addFromUrl($url, $filename = null, $tag = null)
    {
        if (!$stream = @fopen($url, 'rb'))
            throw new Exception(sprintf('Error opening file "%s"', $url));

        return $this->addFromRaw(
            $stream,
            !empty($filename) ? $filename : File::basename($url),
            $tag
        );
    }
public function addFromUrl($url, $filename = null, $tag = null)
    {
        if (!$stream = @fopen($url, 'rb'))
            throw new Exception(sprintf('Error opening file "%s"', $url));

        return $this->addFromRaw(
            $stream,
            !empty($filename) ? $filename : File::basename($url),
            $tag
        );
    }
public function addFromUrl ( $ url , $ filename = null , $ tag = null ) { if ( ! $ stream = @ fopen ( $ url , 'rb' ) ) throw new Exception ( sprintf ( 'Error opening file "%s"' , $ url ) ) ; return $ this -> addFromRaw ( $ stream , ! empty ( $ filename ) ? $ filename : File :: basename ( $ url ) , $ tag ) ; }
Creates a file object from url
@param $url string URL
@param $filename string Filename
@param null $tag
@return $this
@throws \Exception
Creates a file object from url