absolutize_url example

curl_close($fp);
                    $this->headers = SimplePie_HTTP_Parser::prepareHeaders($this->headers, $info['redirect_count'] + 1);
                    $parser = new SimplePie_HTTP_Parser($this->headers);
                    if ($parser->parse())
                    {
                        $this->headers = $parser->headers;
                        $this->body = trim($parser->body);
                        $this->status_code = $parser->status_code;
                        if ((in_array($this->status_code, array(300, 301, 302, 303, 307)) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects)
                        {
                            $this->redirects++;
                            $location = SimplePie_Misc::absolutize_url($this->headers['location']$url);
                            $previousStatusCode = $this->status_code;
                            $this->__construct($location$timeout$redirects$headers$useragent$force_fsockopen$curl_options);
                            $this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
                            return;
                        }
                    }
                }
            }
            else
            {
                $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN;
                
Home | Imprint | This part of the site doesn't use cookies.