<?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: Url Routing with PHP &#8211; Part Three</title>
	<atom:link href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/</link>
	<description></description>
	<lastBuildDate>Thu, 08 Jul 2010 03:46:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: vulo</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-50728</link>
		<dc:creator>vulo</dc:creator>
		<pubDate>Tue, 06 Oct 2009 02:50:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-50728</guid>
		<description>Hi, I have problem with the url router, as it reload 2 3 times before to load the page, of course it is too fast for a normal use to see it, but I include mail sending of every execution of the url-array.
So

I receive that these values are loaded into the url array before the actual data from the URL is loaded

AC_RunActiveContent.js
Scripts
robots.txt
/not the same every time/

and then
the actual URL parameter - &#039;event&#039; or &#039;contacts&#039;
I am using some session messages, that&#039;s how i find this &quot;bug&quot;.

question:
Has anyone have ides, why this is happening.
Thanks in advance
Vulo</description>
		<content:encoded><![CDATA[<p>Hi, I have problem with the url router, as it reload 2 3 times before to load the page, of course it is too fast for a normal use to see it, but I include mail sending of every execution of the url-array.<br />
So</p>
<p>I receive that these values are loaded into the url array before the actual data from the URL is loaded</p>
<p>AC_RunActiveContent.js<br />
Scripts<br />
robots.txt<br />
/not the same every time/</p>
<p>and then<br />
the actual URL parameter &#8211; 'event' or 'contacts'<br />
I am using some session messages, that's how i find this "bug".</p>
<p>question:<br />
Has anyone have ides, why this is happening.<br />
Thanks in advance<br />
Vulo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zsolt sandor</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-24742</link>
		<dc:creator>zsolt sandor</dc:creator>
		<pubDate>Thu, 04 Dec 2008 20:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-24742</guid>
		<description>Hi 

a nice tutorial, ad the first url router witch works on all servers / a least on those teht i tried / 

question:
should be the exampleutils.php the model?</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>a nice tutorial, ad the first url router witch works on all servers / a least on those teht i tried / </p>
<p>question:<br />
should be the exampleutils.php the model?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Handy</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-9539</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Fri, 11 Apr 2008 23:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-9539</guid>
		<description>Thank you for the tutorial. Zend framework provides also a very good frontcontroller. So it might be a help to understand the functionality and build own frontcontroller.</description>
		<content:encoded><![CDATA[<p>Thank you for the tutorial. Zend framework provides also a very good frontcontroller. So it might be a help to understand the functionality and build own frontcontroller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-6483</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 21 Feb 2008 05:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-6483</guid>
		<description>Hi Doug, nice tutorial btw, really clarified MVC for me. I&#039;ve been using on open source MVC framework and I&#039;m looking to build my own now :) Anyway one thing that did demystify me in your tutorial is models - where are they? Could you illustrated within your sample code how you could implement one?

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Doug, nice tutorial btw, really clarified MVC for me. I've been using on open source MVC framework and I'm looking to build my own now <img src='http://www.phpaddiction.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Anyway one thing that did demystify me in your tutorial is models &#8211; where are they? Could you illustrated within your sample code how you could implement one?</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Hill</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3125</link>
		<dc:creator>Doug Hill</dc:creator>
		<pubDate>Sun, 18 Nov 2007 15:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3125</guid>
		<description>John if you look at the Axial_UrlInterpreter class you will see that you can modify how the url is transformed into a command object.  Instead of the way I did it you could make it handle the parameters as key =&gt; value pairs... or any other way you want.  If i get a little time this week i&#039;ll write a new article that covers this.

The urls in the blog come from wordpress not my doing!  

Doug</description>
		<content:encoded><![CDATA[<p>John if you look at the Axial_UrlInterpreter class you will see that you can modify how the url is transformed into a command object.  Instead of the way I did it you could make it handle the parameters as key => value pairs&#8230; or any other way you want.  If i get a little time this week i'll write a new article that covers this.</p>
<p>The urls in the blog come from wordpress not my doing!  </p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3093</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sat, 17 Nov 2007 19:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3093</guid>
		<description>Thank you Doug. It would be great if we could get/post/request parameter value by calling its name.
ie

echo&quot;$params[id]&quot;;

http://localhost/mvc/test/dostuff/id/23/page/3/sort/true

echo&quot;$params[id],$params[page],$params[sort]&quot;;

so, it will prints 23,3,true

How did you managed to get url like this http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/

Did you use MVC method or it is done using .htaccess ?

Regards</description>
		<content:encoded><![CDATA[<p>Thank you Doug. It would be great if we could get/post/request parameter value by calling its name.<br />
ie</p>
<p>echo"$params[id]";</p>
<p><a href="http://localhost/mvc/test/dostuff/id/23/page/3/sort/true" rel="nofollow">http://localhost/mvc/test/dostuff/id/23/page/3/sort/true</a></p>
<p>echo"$params[id],$params[page],$params[sort]";</p>
<p>so, it will prints 23,3,true</p>
<p>How did you managed to get url like this <a href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/" rel="nofollow">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/</a></p>
<p>Did you use MVC method or it is done using .htaccess ?</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Hill</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3090</link>
		<dc:creator>Doug Hill</dc:creator>
		<pubDate>Sat, 17 Nov 2007 17:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3090</guid>
		<description>I think I see what the problem is. If you just want the parameters to the function from the url as formatted like your example http://localhost/mvc/test/dostuff/id/23/ you would use $this-&gt;Command-&gt;getParameters() to access them as an array instead of the $_GET[] variable.

If you want to actually get them from $_GET[] you would have to format your URL like http://localhost/mvc/test/dostuff/?id=23 and use the changes to the code i posted before.

&lt;pre lang=&quot;PHP&quot;&gt;
function _dostuff()
    {
    $params =  $this-&gt;Command-&gt;getParameters();
    echo $params[0].&#039;: &#039;.$params[1];
    showTemplate($this-&gt;Command);
    }
&lt;/php&gt;</description>
		<content:encoded><![CDATA[<p>I think I see what the problem is. If you just want the parameters to the function from the url as formatted like your example <a href="http://localhost/mvc/test/dostuff/id/23/" rel="nofollow">http://localhost/mvc/test/dostuff/id/23/</a> you would use $this->Command->getParameters() to access them as an array instead of the $_GET[] variable.</p>
<p>If you want to actually get them from $_GET[] you would have to format your URL like <a href="http://localhost/mvc/test/dostuff/?id=23" rel="nofollow">http://localhost/mvc/test/dostuff/?id=23</a> and use the changes to the code i posted before.</p>
<pre lang="PHP">
function _dostuff()
    {
    $params =  $this->Command->getParameters();
    echo $params[0].': '.$params[1];
    showTemplate($this->Command);
    }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3077</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sat, 17 Nov 2007 15:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3077</guid>
		<description>Doug,
I&#039;ve downloaded files from from this tutorial then simply  called it through browser http://localhost/mvc/test/dostuff/id/23/. I want to get id from this url.

&lt;pre lang=&quot;PHP&quot;&gt;

        function _error()
            {
            showErrorTemplate($this-&gt;Command);
            }
        function _dostuff()        
            {
             echo&quot;id=$_GET[id]&quot;;
             showTemplate($this-&gt;Command);
            }

}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Doug,<br />
I've downloaded files from from this tutorial then simply  called it through browser <a href="http://localhost/mvc/test/dostuff/id/23/" rel="nofollow">http://localhost/mvc/test/dostuff/id/23/</a>. I want to get id from this url.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">function</span> _error<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; showErrorTemplate<span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">Command</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">function</span> _dostuff<span class="br0">&#40;</span><span class="br0">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/echo"><span class="kw3">echo</span></a><span class="st0">&quot;id=$_GET[id]&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;showTemplate<span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">Command</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Hill</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3066</link>
		<dc:creator>Doug Hill</dc:creator>
		<pubDate>Sat, 17 Nov 2007 09:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3066</guid>
		<description>John, could you drop me some code on email or here to show me what the problem is?

Doug
</description>
		<content:encoded><![CDATA[<p>John, could you drop me some code on email or here to show me what the problem is?</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3041</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 16 Nov 2007 12:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3041</guid>
		<description>Hi Doug,

I tried your above code and it&#039;s not working.</description>
		<content:encoded><![CDATA[<p>Hi Doug,</p>
<p>I tried your above code and it's not working.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
