<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: Relative URL to Absolute URL</title>
	<atom:link href="http://publicmind.in/blog/urltoabsolute/feed/" rel="self" type="application/rss+xml" />
	<link>http://publicmind.in/blog/urltoabsolute/</link>
	<description>Simple and Sophisticated</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:29:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mohit</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-2784</link>
		<dc:creator>Mohit</dc:creator>
		<pubDate>Mon, 09 Jan 2012 04:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-2784</guid>
		<description>Nice article I have used this PHP Script in my website and I have better performance in SEO also</description>
		<content:encoded><![CDATA[<p>Nice article I have used this PHP Script in my website and I have better performance in SEO also</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NubbyNubkins</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-2769</link>
		<dc:creator>NubbyNubkins</dc:creator>
		<pubDate>Mon, 26 Sep 2011 20:51:40 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-2769</guid>
		<description>My apologies. I forgot to clarify that the solution I used is not in the script itself but when the function is called.</description>
		<content:encoded><![CDATA[<p>My apologies. I forgot to clarify that the solution I used is not in the script itself but when the function is called.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NubbyNubkins</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-2768</link>
		<dc:creator>NubbyNubkins</dc:creator>
		<pubDate>Mon, 26 Sep 2011 20:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-2768</guid>
		<description>I was experimenting with this script to see if my solution was slower and it definitely was. My solution was also far more complex. Thank you very much for offering this invaluable tool.
I would also like to mention that this script sometimes has a problem dealing with empty values. While this may not often occur for many people, the way I wrote my link spider would result in empty array values when duplicates or non-page links were found. Because of the location within my script where I needed the absolute url conversion, empty values would appear directly prior to this function. The e-warning would occur on line 327: &quot;return $parts&quot;. and directly under the &quot;if (!$decode)&quot;. The simple solution I used was to include:

if(($var != &quot;&quot;) &#124;&#124; (!empty($var))) {url_to_absolute( $baseUrl, $relativeUrl);}

I just thought you might want to know that there is a potential issue when it concerns empty values.</description>
		<content:encoded><![CDATA[<p>I was experimenting with this script to see if my solution was slower and it definitely was. My solution was also far more complex. Thank you very much for offering this invaluable tool.<br />
I would also like to mention that this script sometimes has a problem dealing with empty values. While this may not often occur for many people, the way I wrote my link spider would result in empty array values when duplicates or non-page links were found. Because of the location within my script where I needed the absolute url conversion, empty values would appear directly prior to this function. The e-warning would occur on line 327: &#8220;return $parts&#8221;. and directly under the &#8220;if (!$decode)&#8221;. The simple solution I used was to include:</p>
<p>if(($var != &#8220;&#8221;) || (!empty($var))) {url_to_absolute( $baseUrl, $relativeUrl);}</p>
<p>I just thought you might want to know that there is a potential issue when it concerns empty values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nitin</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-2657</link>
		<dc:creator>Nitin</dc:creator>
		<pubDate>Sun, 17 Apr 2011 14:34:33 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-2657</guid>
		<description>The complexity in the Dave&#039;s solution has been added intentionally and well explained. If you read the tutorial, you would know why he avoided using the &lt;code&gt;parse_url&lt;/code&gt; function and wrote his custom functions.

Although I am not sure how many of his assumptions are still valid, it has been long when I looked at the code (it works so well!!) :)</description>
		<content:encoded><![CDATA[<p>The complexity in the Dave&#8217;s solution has been added intentionally and well explained. If you read the tutorial, you would know why he avoided using the</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">parse_url</div></div>
<p>function and wrote his custom functions.</p>
<p>Although I am not sure how many of his assumptions are still valid, it has been long when I looked at the code (it works so well!!) <img src='http://publicmind.in/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-2656</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sun, 17 Apr 2011 12:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-2656</guid>
		<description>This one is way more simple, and even works for parent directories (..) and recognizes base direcories (.):

&lt;a href=&quot;Relative to absolute URL conversion using PHP&quot; rel=&quot;nofollow&quot;&gt;http://web-o-blog.blogspot.com/2011/04/function-absoluteurlbaseurl-relativeurl.html&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>This one is way more simple, and even works for parent directories (..) and recognizes base direcories (.):</p>
<p><a href="Relative to absolute URL conversion using PHP" rel="nofollow">http://web-o-blog.blogspot.com/2011/04/function-absoluteurlbaseurl-relativeurl.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinar Q.</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-1079</link>
		<dc:creator>Dinar Q.</dc:creator>
		<pubDate>Wed, 30 Jun 2010 14:20:18 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-1079</guid>
		<description>i have tried to modify this way : function join_url( $parts, $encode=TRUE) - does not help - also does not work.
it returns empty string, as i remember.</description>
		<content:encoded><![CDATA[<p>i have tried to modify this way : function join_url( $parts, $encode=TRUE) &#8211; does not help &#8211; also does not work.<br />
it returns empty string, as i remember.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinar Q.</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-1078</link>
		<dc:creator>Dinar Q.</dc:creator>
		<pubDate>Tue, 29 Jun 2010 15:57:30 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-1078</guid>
		<description>address like http://kk.wiktionary.org/wiki/Басты_бет does not work, example of such link, in this page: http://tor.kz/index.php/%D0%91%D0%B0%D1%81%D1%82%D1%8B_%D0%B1%D0%B5%D1%82 .</description>
		<content:encoded><![CDATA[<p>address like <a href="http://kk.wiktionary.org/wiki/Басты_бет" rel="nofollow">http://kk.wiktionary.org/wiki/Басты_бет</a> does not work, example of such link, in this page: <a href="http://tor.kz/index.php/%D0%91%D0%B0%D1%81%D1%82%D1%8B_%D0%B1%D0%B5%D1%82" rel="nofollow">http://tor.kz/index.php/%D0%91%D0%B0%D1%81%D1%82%D1%8B_%D0%B1%D0%B5%D1%82</a> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nitin</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-1014</link>
		<dc:creator>Nitin</dc:creator>
		<pubDate>Wed, 19 May 2010 21:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-1014</guid>
		<description>split_url() over parse_url(), explained here:  http://bit.ly/diaXxL

Cheers,</description>
		<content:encoded><![CDATA[<p>split_url() over parse_url(), explained here:  <a href="http://bit.ly/diaXxL" rel="nofollow">http://bit.ly/diaXxL</a></p>
<p>Cheers,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler Akins</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-1012</link>
		<dc:creator>Tyler Akins</dc:creator>
		<pubDate>Wed, 19 May 2010 17:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-1012</guid>
		<description>Oh, I&#039;m sorry that I didn&#039;t mention this in my last post, but why don&#039;t you use parse_url() instead of your split_url()?  I&#039;m a fan of using built-in functions when possible for speed and because a larger developer base will be continually reviewing its functionality.</description>
		<content:encoded><![CDATA[<p>Oh, I&#8217;m sorry that I didn&#8217;t mention this in my last post, but why don&#8217;t you use parse_url() instead of your split_url()?  I&#8217;m a fan of using built-in functions when possible for speed and because a larger developer base will be continually reviewing its functionality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler Akins</title>
		<link>http://publicmind.in/blog/urltoabsolute/#comment-1011</link>
		<dc:creator>Tyler Akins</dc:creator>
		<pubDate>Wed, 19 May 2010 17:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://publicmind.phpzilla.net/?p=41#comment-1011</guid>
		<description>This function doesn&#039;t really work well for file:/// URLs.  For instance, url_to_absolute(&#039;file:///path/file.html&#039;, &#039;image.gif&#039;) returns false.  Would you be able to change line 82 a bit so that if the scheme is &#039;file&#039;, it won&#039;t require &#039;host&#039;?

(Yeah, I can make the change locally, but I&#039;d rather the change gets back into the main distribution.)</description>
		<content:encoded><![CDATA[<p>This function doesn&#8217;t really work well for file:/// URLs.  For instance, url_to_absolute(&#8216;file:///path/file.html&#8217;, &#8216;image.gif&#8217;) returns false.  Would you be able to change line 82 a bit so that if the scheme is &#8216;file&#8217;, it won&#8217;t require &#8216;host&#8217;?</p>
<p>(Yeah, I can make the change locally, but I&#8217;d rather the change gets back into the main distribution.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

