<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: How to Find the Current URL with PHP</title>
	<link>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/</link>
	<description>Contains no moose and very litle disco. :'(</description>
	<pubDate>Wed, 08 Oct 2008 10:25:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
		<item>
		<title>By: Kenneth</title>
		<link>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-15856</link>
		<dc:creator>Kenneth</dc:creator>
		<pubDate>Fri, 11 May 2007 06:53:17 +0000</pubDate>
		<guid>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-15856</guid>
		<description>I have been looking for this for quite some time, thanks</description>
		<content:encoded><![CDATA[<p>I have been looking for this for quite some time, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-15235</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 08 May 2007 13:55:33 +0000</pubDate>
		<guid>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-15235</guid>
		<description>These techniques dont work for me, wont solve my problem.  These methods will tell you what the file path is of the script that is running it.  It is also possible to have one script initiate another with the include() command... which still works according to your techniques.  The URL that is returned will be that of the highest level, the first script that initiated the cascade of scripts.

But, HTML is capable of referencing PHP, say, in an , , or  tag or something (like in the case of GD Image Libraries).  The above techniques will not work for this situation.  The above techniques will only return the URL of the highest level PHP script file, not the URL in the address bar, the URL of the page being displayed, the page that initiated the script in the first place.

Is there a way to read directly the URL that the browser is displaying?  This would be the highest level URL in any given window.</description>
		<content:encoded><![CDATA[<p>These techniques dont work for me, wont solve my problem.  These methods will tell you what the file path is of the script that is running it.  It is also possible to have one script initiate another with the include() command&#8230; which still works according to your techniques.  The URL that is returned will be that of the highest level, the first script that initiated the cascade of scripts.</p>
<p>But, HTML is capable of referencing PHP, say, in an , , or  tag or something (like in the case of GD Image Libraries).  The above techniques will not work for this situation.  The above techniques will only return the URL of the highest level PHP script file, not the URL in the address bar, the URL of the page being displayed, the page that initiated the script in the first place.</p>
<p>Is there a way to read directly the URL that the browser is displaying?  This would be the highest level URL in any given window.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit</title>
		<link>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-4507</link>
		<dc:creator>Lalit</dc:creator>
		<pubDate>Sat, 27 Jan 2007 08:31:44 +0000</pubDate>
		<guid>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-4507</guid>
		<description>thanks dear,
very very thanking you.</description>
		<content:encoded><![CDATA[<p>thanks dear,<br />
very very thanking you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr. Brown Eyes</title>
		<link>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-58</link>
		<dc:creator>Mr. Brown Eyes</dc:creator>
		<pubDate>Sat, 27 May 2006 03:59:10 +0000</pubDate>
		<guid>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-58</guid>
		<description>How about anchor link? #anchor</description>
		<content:encoded><![CDATA[<p>How about anchor link? #anchor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zudolou</title>
		<link>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-57</link>
		<dc:creator>Zudolou</dc:creator>
		<pubDate>Fri, 26 May 2006 18:40:19 +0000</pubDate>
		<guid>http://discomoose.org/2005/11/02/how-to-find-the-current-url-with-php/#comment-57</guid>
		<description>You might want to get the https as well.

$http = ($_SERVER['HTTPS'] ? 'https://' : 'http://');

$url2 = $http . $domain . $_SERVER['REQUEST_URI'];</description>
		<content:encoded><![CDATA[<p>You might want to get the https as well.</p>
<p>$http = ($_SERVER[&#8217;HTTPS&#8217;] ? &#8216;https://&#8217; : &#8216;http://&#8217;);</p>
<p>$url2 = $http . $domain . $_SERVER[&#8217;REQUEST_URI&#8217;];</p>
]]></content:encoded>
	</item>
</channel>
</rss>
