<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Thu May 23, 2013 5:21 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Thu May 23, 2013 5:21 pm</pubDate>
  <lastBuildDate>Thu May 23, 2013 5:21 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Re: PHP Coding Academy - request for Hudzilla</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91650#91650</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=65997'&gt;chriswadams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Aug 04, 2010 11:33 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hi, Ram &amp;amp; nikkius:&lt;br /&gt;
&lt;br /&gt;
That &lt;span style=&quot;font-weight: bold&quot;&gt;was &lt;/span&gt;well spotted nikkius. And you were right, moving the brace fixed that part of the problem. &lt;br /&gt;
&lt;br /&gt;
What remained was that the resulting headlines weren't printed as hyper-text. By placing this line --&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;print &amp;#40;&amp;quot;Testing ...&amp;quot;&amp;#41;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
-- in the second code block, and adding this --&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;echo &amp;quot;&amp;lt;p&amp;gt;&amp;lt;a href=\&amp;quot;$title\&amp;quot;&amp;gt;$title&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
-- to the first code block, I discovered that the script was completely ignoring the second block. Is it supposed to do that? &lt;br /&gt;
&lt;br /&gt;
The second change above, produced clickable links, although strangely, none lead to any feeds.&lt;br /&gt;
&lt;br /&gt;
Anyway, thanks for the help, guys!&lt;br /&gt;
chriswadams.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91650#91650</comments>
                                        <author>chriswadams</author>
                                        <pubDate>Wed Aug 04, 2010 11:33 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91650#91650</guid>
                                      </item>
                                      <item>
                                        <title>Re: PHP Coding Academy - request for Hudzilla</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91641#91641</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=130'&gt;Ram&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Aug 04, 2010 4:47 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Well spotted.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91641#91641</comments>
                                        <author>Ram</author>
                                        <pubDate>Wed Aug 04, 2010 4:47 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91641#91641</guid>
                                      </item>
                                      <item>
                                        <title>Re: PHP Coding Academy - request for Hudzilla</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91640#91640</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=66802'&gt;nikkius&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Aug 04, 2010 3:21 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I think the problem with your code is a curly bracket (or brace) in the wrong place.&lt;br /&gt;
you have:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;#125;else&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;file_put_contents&amp;#40;&amp;quot;saved_feeds&amp;quot;, &amp;quot;$input\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
and you have at the end of the first block of php:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;nbsp; &amp;nbsp;print &amp;quot;&amp;lt;p&amp;gt;$title&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
?&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Should be:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;#125;else&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;file_put_contents&amp;#40;&amp;quot;saved_feeds&amp;quot;, &amp;quot;$input\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
and should be at the end of the first block of php:&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;print &amp;quot;&amp;lt;p&amp;gt;$title&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
?&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
As to the ' if (file_exists(&amp;quot;saved_feeds&amp;quot;)){ ' block of code,&lt;br /&gt;
page 39 is to display the list of previously entered feeds in the browser if the saved list exists, page 42 is about checking the saved file exists, if not create it and don't add duplicate entries to the saved file, and get rss feed list from the site the user entered and display the titles.&lt;br /&gt;
&lt;br /&gt;
The 'display titles' bit only works for me when entering &lt;a href=&quot;http://www.tuxradar.com/rss&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.tuxradar.com/rss&lt;/a&gt; but that may just be because I don't know any other rss feed url's that conform to the code.&lt;br /&gt;
&lt;br /&gt;
hth</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91640#91640</comments>
                                        <author>nikkius</author>
                                        <pubDate>Wed Aug 04, 2010 3:21 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91640#91640</guid>
                                      </item>
                                      <item>
                                        <title>Re: PHP Coding Academy - request for Hudzilla</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91502#91502</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=65997'&gt;chriswadams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun Aug 01, 2010 2:39 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Here is what I have:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if&amp;#40;isset&amp;#40;$_POST&amp;#91;&amp;quot;user_input&amp;quot;&amp;#93;&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$input=$_POST&amp;#91;&amp;quot;user_input&amp;quot;&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;//don't try to load the saved_feeds file if it doesn't exist!&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if &amp;#40;file_exists&amp;#40;&amp;quot;saved_feeds&amp;quot;&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$feeds=file_get_contents&amp;#40;&amp;quot;saved_feeds&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$feeds=explode&amp;#40;&amp;quot;\n&amp;quot;, $feeds&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if&amp;#40;!in_array&amp;#40;$input, $feeds&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;//it's a new feed!&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;file_put_contents&amp;#40;&amp;quot;saved_feeds&amp;quot;, &amp;quot;$input\n&amp;quot;, FILE_APPEND&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;else&amp;#123;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;file_put_contents&amp;#40;&amp;quot;saved_feeds&amp;quot;, &amp;quot;$input\n&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$feed = simplexml_load_file&amp;#40;$input&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$titles = $feed-&amp;gt;xpath&amp;#40;&amp;quot;//item/title&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;foreach &amp;#40;$titles as $title&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;print &amp;quot;&amp;lt;p&amp;gt;$title&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;project2.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;user_input&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;?php&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if &amp;#40;file_exists&amp;#40;&amp;quot;saved_feeds&amp;quot;&amp;#41;&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$feeds=file_get_contents&amp;#40;&amp;quot;saved_feeds&amp;quot;&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$feeds=explode&amp;#40;&amp;quot;\n&amp;quot;, $feeds&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;foreach &amp;#40;$feeds as $feed&amp;#41;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;echo &amp;quot;&amp;lt;p&amp;gt;&amp;lt;a href=\&amp;quot;$feed\&amp;quot;&amp;gt;$feed&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Mainly, I'm confused about the ' if (file_exists(&amp;quot;saved_feeds&amp;quot;)){ ' block of code. On p. 39 of the 'Coding Academy', Hudzilla indicates that it goes toward the end of the script, but on p. 42 he indicates that it goes at the top ... or perhaps both. I don't know whether the redundancy is right or wrong. I have tried all three possibilities with no results. &lt;br /&gt;
&lt;br /&gt;
Note that the script worked prior to adding in that block on p. 39, but as it is now, it doesn't do anything. This makes me think I have also somehow messed up the syntax, maybe leaving out a semicolon or parenthsis somewhere, but I can't find it. If you can spot it, I would be grateful.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
chriswadams.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91502#91502</comments>
                                        <author>chriswadams</author>
                                        <pubDate>Sun Aug 01, 2010 2:39 am</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91502#91502</guid>
                                      </item>
                                      <item>
                                        <title>Re: PHP Coding Academy - request for Hudzilla</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91501#91501</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=130'&gt;Ram&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Jul 31, 2010 11:12 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Post your code Chris.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91501#91501</comments>
                                        <author>Ram</author>
                                        <pubDate>Sat Jul 31, 2010 11:12 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91501#91501</guid>
                                      </item>
                                      <item>
                                        <title>PHP Coding Academy - request for Hudzilla</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91495#91495</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=65997'&gt;chriswadams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Jul 31, 2010 10:17 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hey Paul --&lt;br /&gt;
&lt;br /&gt;
I'm working on Project 2, and I really messed up on step 2. Would you mind posting the full, final source code, so I could have a look at it?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
chriswadams.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91495#91495</comments>
                                        <author>chriswadams</author>
                                        <pubDate>Sat Jul 31, 2010 10:17 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91495#91495</guid>
                                      </item></channel></rss>