












<?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 function for Javascript redirect</title>
	<atom:link href="http://blogulate.com/content/php-function-for-javascript-redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogulate.com/content/php-function-for-javascript-redirect/</link>
	<description>Snippets from the web</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:03:18 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: yeahboy</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-5623</link>
		<dc:creator>yeahboy</dc:creator>
		<pubDate>Mon, 20 Apr 2009 08:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-5623</guid>
		<description>oh wtf.. nevermind. the code is being messed up by the blog.</description>
		<content:encoded><![CDATA[<p>oh wtf.. nevermind. the code is being messed up by the blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yeahboy</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-5622</link>
		<dc:creator>yeahboy</dc:creator>
		<pubDate>Mon, 20 Apr 2009 08:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-5622</guid>
		<description>i guess you can make it as simple as this:

  function js_redirect($url, $seconds=1)
  {
    echo &#039;&#039;;
    echo &#039;function redirect() {&#039;;
    echo &#039;window.location = &quot;&#039; . $url . &#039;&quot;;&#039;;
    echo &#039;}&#039;;
    echo &#039;timer = setTimeout(&quot;redirect()&quot;, &quot;&#039; . ($seconds*1000) . &#039;&quot;);&#039;;
    echo &#039;&#039;;
    return true;
  }</description>
		<content:encoded><![CDATA[<p>i guess you can make it as simple as this:</p>
<p>  function js_redirect($url, $seconds=1)<br />
  {<br />
    echo &#8221;;<br />
    echo &#8216;function redirect() {&#8217;;<br />
    echo &#8216;window.location = &#8220;&#8216; . $url . &#8216;&#8221;;&#8217;;<br />
    echo &#8216;}&#8217;;<br />
    echo &#8216;timer = setTimeout(&#8221;redirect()&#8221;, &#8220;&#8216; . ($seconds*1000) . &#8216;&#8221;);&#8217;;<br />
    echo &#8221;;<br />
    return true;<br />
  }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yeahboy</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-5621</link>
		<dc:creator>yeahboy</dc:creator>
		<pubDate>Mon, 20 Apr 2009 08:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-5621</guid>
		<description>this ain&#039;t working...</description>
		<content:encoded><![CDATA[<p>this ain&#8217;t working&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kirkorov</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-2134</link>
		<dc:creator>Kirkorov</dc:creator>
		<pubDate>Wed, 06 Feb 2008 18:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-2134</guid>
		<description>Haha. It&#039;s funny.</description>
		<content:encoded><![CDATA[<p>Haha. It&#8217;s funny.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thinkdj</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-2052</link>
		<dc:creator>thinkdj</dc:creator>
		<pubDate>Sun, 27 Jan 2008 17:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-2052</guid>
		<description>You could also view the source of the following page for another JS redirect: 

http://www.tizag.com/javascriptT/examples/timedelay.php</description>
		<content:encoded><![CDATA[<p>You could also view the source of the following page for another JS redirect: </p>
<p><a href="http://www.tizag.com/javascriptT/examples/timedelay.php" rel="nofollow">http://www.tizag.com/javascriptT/examples/timedelay.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thinkdj</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-2051</link>
		<dc:creator>thinkdj</dc:creator>
		<pubDate>Sun, 27 Jan 2008 17:08:26 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-2051</guid>
		<description>Toraj,
I think the best for you would be a simpler META tag

 
&lt;code&gt;&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;URL=http://google.com&quot;&gt;&lt;/code&gt;



Just add this in the within the &lt;head&gt; &lt;/head&gt; of your html. Change 0 to an integer value for time to wait before redirecting..</description>
		<content:encoded><![CDATA[<p>Toraj,<br />
I think the best for you would be a simpler META tag</p>
<p><code>&lt;meta http-equiv="refresh" content="0;URL=http://google.com"&gt;</code></p>
<p>Just add this in the within the &lt;head&gt; &lt;/head&gt; of your html. Change 0 to an integer value for time to wait before redirecting..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toraj</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-2050</link>
		<dc:creator>toraj</dc:creator>
		<pubDate>Sun, 27 Jan 2008 16:58:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-2050</guid>
		<description>hello thinkdj
so can i direct with this code myweblog to website ?</description>
		<content:encoded><![CDATA[<p>hello thinkdj<br />
so can i direct with this code myweblog to website ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thinkdj</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-2048</link>
		<dc:creator>thinkdj</dc:creator>
		<pubDate>Sun, 27 Jan 2008 04:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-2048</guid>
		<description>Hi toraj, 
Sorry about that. It&#039;s a JavaScript echoed using PHP so that the destination URL and time before redirection could be called dynamically.. 
Eg : 

js_redirect(http://google.com,5); //Redirects to Google after 5 seconds.

js_redirect(http://google.co.in,15); //Redirects to Google.co.in after 15 seconds.</description>
		<content:encoded><![CDATA[<p>Hi toraj,<br />
Sorry about that. It&#8217;s a JavaScript echoed using PHP so that the destination URL and time before redirection could be called dynamically..<br />
Eg : </p>
<p>js_redirect(http://google.com,5); //Redirects to Google after 5 seconds.</p>
<p>js_redirect(http://google.co.in,15); //Redirects to Google.co.in after 15 seconds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toraj</title>
		<link>http://blogulate.com/content/php-function-for-javascript-redirect/comment-page-1/#comment-2047</link>
		<dc:creator>toraj</dc:creator>
		<pubDate>Sat, 26 Jan 2008 20:21:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogulate.com/content/php-function-for-javascript-redirect/#comment-2047</guid>
		<description>what is this code? please say more about that
thanks a lot</description>
		<content:encoded><![CDATA[<p>what is this code? please say more about that<br />
thanks a lot</p>
]]></content:encoded>
	</item>
</channel>
</rss>
