<?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 5 + XML]: XML Login</title>
	<atom:link href="http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html</link>
	<description>Collections of poetry, programming codes, thoughts on various issues, and photos on various occasions.</description>
	<lastBuildDate>Sun, 21 Feb 2010 06:56:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: e11world</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-397</link>
		<dc:creator>e11world</dc:creator>
		<pubDate>Tue, 23 Jun 2009 23:42:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-397</guid>
		<description>This is a very nice tutorial. I added a function where it logs the date and time for each user each time they login. I hope someone finds it useful.  ;-) 
Add this function before (not sure if it matters) your code
function log_login($username){
    $file = fopen(&quot;logged_in.txt&quot;, &quot;a+&quot;);
    if ($file != null){
    $time = localtime(time(), true);
    $str = sprintf(&quot;User \&quot;$username\&quot; logged in on %s at (%d:%d:%d). \r\n&quot;,
			date(&quot;Y-m-d&quot;),
			$time[&quot;tm_hour&quot;],
			$time[&quot;tm_min&quot;],
			$time[&quot;tm_sec&quot;],
			$username);
    fwrite($file, $str);
    fclose($file);
    }
}

and call it log_login($username); on login success</description>
		<content:encoded><![CDATA[<p>This is a very nice tutorial. I added a function where it logs the date and time for each user each time they login. I hope someone finds it useful.  <img src='http://mohdrashidi.com/wordpress25/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Add this function before (not sure if it matters) your code<br />
function log_login($username){<br />
    $file = fopen(&#8220;logged_in.txt&#8221;, &#8220;a+&#8221;);<br />
    if ($file != null){<br />
    $time = localtime(time(), true);<br />
    $str = sprintf(&#8220;User \&#8221;$username\&#8221; logged in on %s at (%d:%d:%d). \r\n&#8221;,<br />
			date(&#8220;Y-m-d&#8221;),<br />
			$time["tm_hour"],<br />
			$time["tm_min"],<br />
			$time["tm_sec"],<br />
			$username);<br />
    fwrite($file, $str);<br />
    fclose($file);<br />
    }<br />
}</p>
<p>and call it log_login($username); on login success</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-256</link>
		<dc:creator>Madhu</dc:creator>
		<pubDate>Thu, 12 Mar 2009 21:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-256</guid>
		<description>I tried this in my .php file,

$xml = simplexml_load_file(&#039;$file&#039;);
var_dump($xml);  

and the output is bool(false).I am not sure what is stopping the file from being loaded. I even tried to load it as a string with the help of this, but still no luck.
$xml = simplexml_load_string(file_get_contents(&#039;login.xml&#039;));  

I tried with hard coding the URL,still no luck. Am I missing something here. I am sorry, I am new to PHP.

Regards
V.C.Madhu</description>
		<content:encoded><![CDATA[<p>I tried this in my .php file,</p>
<p>$xml = simplexml_load_file(&#8216;$file&#8217;);<br />
var_dump($xml);  </p>
<p>and the output is bool(false).I am not sure what is stopping the file from being loaded. I even tried to load it as a string with the help of this, but still no luck.<br />
$xml = simplexml_load_string(file_get_contents(&#8216;login.xml&#8217;));  </p>
<p>I tried with hard coding the URL,still no luck. Am I missing something here. I am sorry, I am new to PHP.</p>
<p>Regards<br />
V.C.Madhu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacko</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-253</link>
		<dc:creator>Jacko</dc:creator>
		<pubDate>Wed, 04 Mar 2009 01:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-253</guid>
		<description>Tried and tested here and all working fine, just 1 question, how do i once i have re-directed a user logged on to whateverblahblah.html, show the logged on users name in a Welcome statement.....ie user logs on correctly and then the redirected page that shows...Welcome John Doe etc??</description>
		<content:encoded><![CDATA[<p>Tried and tested here and all working fine, just 1 question, how do i once i have re-directed a user logged on to whateverblahblah.html, show the logged on users name in a Welcome statement&#8230;..ie user logs on correctly and then the redirected page that shows&#8230;Welcome John Doe etc??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-251</link>
		<dc:creator>Madhu</dc:creator>
		<pubDate>Wed, 25 Feb 2009 19:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-251</guid>
		<description>Hi,
Whatever I do.. I keep getting the same error   :sad:. I changed the whole thing,but its not working.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Whatever I do.. I keep getting the same error   <img src='http://mohdrashidi.com/wordpress25/wp-includes/images/smilies/icon_sad.gif' alt=':sad:' class='wp-smiley' /> . I changed the whole thing,but its not working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Root Ninja</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-195</link>
		<dc:creator>Root Ninja</dc:creator>
		<pubDate>Sat, 22 Nov 2008 00:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-195</guid>
		<description>For moi.

If you use the above solution that should fix your first problem.

For the second it depends on what you want to happen when a user is logged in. If you want the user to be directed to another page, type:
header(&quot;Location: http://www.domain.uk/file.html&quot;);

in place of:
echo &quot;Valid user logged in!&quot;;

If you do this I would suggest setting the new page to receive a variable that confirms the user is logged in, so that users can just go directly to the page using the URL.

Enjoy :grin:</description>
		<content:encoded><![CDATA[<p>For moi.</p>
<p>If you use the above solution that should fix your first problem.</p>
<p>For the second it depends on what you want to happen when a user is logged in. If you want the user to be directed to another page, type:<br />
header(&#8220;Location: <a href="http://www.domain.uk/file.html">http://www.domain.uk/file.html</a>&#8220;);</p>
<p>in place of:<br />
echo &#8220;Valid user logged in!&#8221;;</p>
<p>If you do this I would suggest setting the new page to receive a variable that confirms the user is logged in, so that users can just go directly to the page using the URL.</p>
<p>Enjoy <img src='http://mohdrashidi.com/wordpress25/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Root Ninja</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-194</link>
		<dc:creator>Root Ninja</dc:creator>
		<pubDate>Sat, 22 Nov 2008 00:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-194</guid>
		<description>Solution for the &quot;user is inactive&quot; error.

Hi all, I read the error you have found, and so tested the code myself to find that I too had the problem and so searched out the solution.

Its a tricky one to spot, but most of you will have copied and pasted the code, herein lies your problem. Simply manually type the &quot;&#039;&quot; marks in $username = [&#039;username&#039;]; and $password = [&#039;$password&#039;];

Problem solved! :grin:</description>
		<content:encoded><![CDATA[<p>Solution for the &#8220;user is inactive&#8221; error.</p>
<p>Hi all, I read the error you have found, and so tested the code myself to find that I too had the problem and so searched out the solution.</p>
<p>Its a tricky one to spot, but most of you will have copied and pasted the code, herein lies your problem. Simply manually type the &#8220;&#8216;&#8221; marks in $username = ['username']; and $password = ['$password'];</p>
<p>Problem solved! <img src='http://mohdrashidi.com/wordpress25/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moi</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-189</link>
		<dc:creator>moi</dc:creator>
		<pubDate>Mon, 17 Nov 2008 14:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-189</guid>
		<description>Hi, im hitting a couple of probs.

1) says user inactive when its set to 1
2) if there is a successful log in - nothing happens.  Where is the redirect code to the content?</description>
		<content:encoded><![CDATA[<p>Hi, im hitting a couple of probs.</p>
<p>1) says user inactive when its set to 1<br />
2) if there is a successful log in &#8211; nothing happens.  Where is the redirect code to the content?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sumit</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-183</link>
		<dc:creator>sumit</dc:creator>
		<pubDate>Mon, 10 Nov 2008 03:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-183</guid>
		<description>I&#039;m always getting the msg which pervious discussed. How can i solve it?</description>
		<content:encoded><![CDATA[<p>I&#8217;m always getting the msg which pervious discussed. How can i solve it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sumit</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-182</link>
		<dc:creator>sumit</dc:creator>
		<pubDate>Mon, 10 Nov 2008 03:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-182</guid>
		<description>I&#039;m always get the msg &quot;user is inactive&quot;. How can i solve it?</description>
		<content:encoded><![CDATA[<p>I&#8217;m always get the msg &#8220;user is inactive&#8221;. How can i solve it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slim</title>
		<link>http://blog.mohdrashidi.com/sources-for-share/2008/06/08/php-xml-xml-login.html/comment-page-1#comment-113</link>
		<dc:creator>Slim</dc:creator>
		<pubDate>Mon, 11 Aug 2008 17:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mohdrashidi.com/?p=76#comment-113</guid>
		<description>Hey, nevermind my previous post. I followed your structure for storing the user details, and everything is working fine. Thank you for a great, yet simple tutorial! Cheers mate!</description>
		<content:encoded><![CDATA[<p>Hey, nevermind my previous post. I followed your structure for storing the user details, and everything is working fine. Thank you for a great, yet simple tutorial! Cheers mate!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
