<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web development &#187; Echo</title>
	<atom:link href="http://sourcecodemoney.com/tag/echo/feed/" rel="self" type="application/rss+xml" />
	<link>http://sourcecodemoney.com</link>
	<description>Use source code for money</description>
	<lastBuildDate>Mon, 21 Nov 2011 12:03:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Show wordpress post attachment</title>
		<link>http://sourcecodemoney.com/show-wordpress-post-attachment/wordpress/</link>
		<comments>http://sourcecodemoney.com/show-wordpress-post-attachment/wordpress/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 02:53:42 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Attachments]]></category>
		<category><![CDATA[Echo]]></category>
		<category><![CDATA[Null]]></category>
		<category><![CDATA[Type 1]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=270</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		$args = array( &#8216;post_type&#8217; =&#62; &#8216;attachment&#8217;, &#8216;numberposts&#8217; =&#62; -1, &#8216;post_status&#8217; =&#62; null, &#8216;post_parent&#8217; =&#62; 323 ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo($attachment-&#62;guid); } }]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/show-wordpress-post-attachment/wordpress/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>$args = array(<br />
&#8216;post_type&#8217; =&gt; &#8216;attachment&#8217;,<br />
&#8216;numberposts&#8217; =&gt; -1,<br />
&#8216;post_status&#8217; =&gt; null,<br />
&#8216;post_parent&#8217; =&gt; 323<br />
);<br />
$attachments = get_posts($args);<br />
if ($attachments) {<br />
foreach ($attachments as $attachment) {<br />
echo($attachment-&gt;guid);<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/show-wordpress-post-attachment/wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get absoute path PHP</title>
		<link>http://sourcecodemoney.com/get-absoute-path-php/php-code/</link>
		<comments>http://sourcecodemoney.com/get-absoute-path-php/php-code/#comments</comments>
		<pubDate>Fri, 28 May 2010 07:55:16 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP code]]></category>
		<category><![CDATA[Echo]]></category>
		<category><![CDATA[Getcwd]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Path]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=246</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		&#60;?php $path = getcwd(); echo $path; ?&#62;]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/get-absoute-path-php/php-code/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>&lt;?php<br />
$path = getcwd();<br />
echo $path;<br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/get-absoute-path-php/php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent sql injection code</title>
		<link>http://sourcecodemoney.com/prevent-sql-injection-code/php-code/</link>
		<comments>http://sourcecodemoney.com/prevent-sql-injection-code/php-code/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 15:35:33 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP code]]></category>
		<category><![CDATA[Attacker]]></category>
		<category><![CDATA[Database Host]]></category>
		<category><![CDATA[Echo]]></category>
		<category><![CDATA[Input Data]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Prevent Sql Injection]]></category>
		<category><![CDATA[Sql Code]]></category>
		<category><![CDATA[Sql Commands]]></category>
		<category><![CDATA[Sql Injection]]></category>
		<category><![CDATA[Sql Injection Php]]></category>
		<category><![CDATA[String Str]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=84</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		SQL Injection is a technique where an attacker creates or alters existing SQL commands to tamper data, override valuable ones, or even to execute dangerous system level commands on the database host. To avoid this, always check your input data using the function below: function checkValid($str) { $valid_string = &#8220;[\*\^\'\;]&#8220;; if(ereg($valid_string,$str)) { echo(&#8220;&#60;script&#62;alert(&#8216;Invalid characted&#8217;);&#60;/script&#62;&#8221;); die(); [...]]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/prevent-sql-injection-code/php-code/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>SQL Injection is a technique where an attacker creates or      alters existing SQL commands to tamper data, override valuable      ones, or even to execute dangerous system level commands on the database      host. To avoid this, always check your input data using the function below:</p>
<div id="code">function checkValid($str)<br />
{<br />
$valid_string = &#8220;[\*\^\'\;]&#8220;;<br />
if(ereg($valid_string,$str))<br />
{<br />
echo(&#8220;&lt;script&gt;alert(&#8216;Invalid characted&#8217;);&lt;/script&gt;&#8221;);<br />
die();<br />
}<br />
else<br />
{<br />
return $str;<br />
}<br />
}</div>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/prevent-sql-injection-code/php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make wordpress plugin: General</title>
		<link>http://sourcecodemoney.com/how-to-make-wordpress-plugin-general/php-code/</link>
		<comments>http://sourcecodemoney.com/how-to-make-wordpress-plugin-general/php-code/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 11:57:26 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP code]]></category>
		<category><![CDATA[Wordpress plugin]]></category>
		<category><![CDATA[Amp]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Constructor]]></category>
		<category><![CDATA[Content Filter]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Digg]]></category>
		<category><![CDATA[Div Id]]></category>
		<category><![CDATA[Echo]]></category>
		<category><![CDATA[Filter Content]]></category>
		<category><![CDATA[Filter Function]]></category>
		<category><![CDATA[How To Make Wordpress Plugin]]></category>
		<category><![CDATA[Img]]></category>
		<category><![CDATA[Link Href]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[Page Loads]]></category>
		<category><![CDATA[Phase 2]]></category>
		<category><![CDATA[Php Function]]></category>
		<category><![CDATA[Png]]></category>
		<category><![CDATA[Stylesheet]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=69</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		This article will present you with the basics of wordpress plugin. I have create a plugin to help you understand how to create a plugin. This simple plugin shows a digg button to all your post. You can download the full code here. Below is several code I use: class diggme { function diggme() { [...]]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/how-to-make-wordpress-plugin-general/php-code/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>This article will present you with the basics of wordpress plugin. I have create a plugin to help you understand how to create a plugin. This simple plugin shows a digg button to all your post. You can download the full code <a href="http://sourcecodemoney.com/doc/diggme.zip">here</a>. Below is several code I use:</p>
<div id="code">
<p>class diggme<br />
{<br />
function diggme() {</p>
<p>add_action(&#8216;init&#8217;, array($this, &#8216;init&#8217;));<br />
add_action(&#8216;admin_menu&#8217;, array(&amp;$this, &#8216;setmenu&#8217;));<br />
add_filter(&#8216;the_content&#8217;, array(&amp;$this, &#8216;the_content_filter&#8217;));<br />
}</p>
<p>function init()<br />
{<br />
?&gt;<br />
&lt;link href=&#8221;&lt;?php echo get_option(&#8216;siteurl&#8217;); ?&gt;/wp-content/plugins/diggme/css.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;<br />
&lt;?php<br />
}</p>
<p>function managepage(){<br />
echo &#8220;&lt;div id=&#8217;setting&#8217;&gt;This is setting page. Just ignore this&lt;/div&gt;&#8221;;<br />
}</p>
<p>function setmenu () {<br />
add_options_page(<br />
&#8216;DiggMe&#8217;,<br />
&#8216;DiggMe&#8217;,<br />
&#8216;manage_options&#8217;,<br />
__FILE__,<br />
array(&amp;$this,&#8217;managepage&#8217; ) );<br />
}</p>
<p>function the_content_filter($content)<br />
{<br />
return $this-&gt;displaydigg() . $content;<br />
}</p>
<p>function displaydigg()<br />
{<br />
global $post;</p>
<p>return &#8220;&lt;div id=\&#8221;diggbutton\&#8221;&gt;&lt;a href=\&#8221;http://digg.com/submit?phase=2&amp;amp;url=&#8221;.get_permalink($post-&gt;ID).&#8221;\&#8221;&gt;&lt;img src=\&#8221;".get_settings(&#8216;siteurl&#8217;).&#8221;/wp-content/plugins/diggme/digg.png\&#8221;&gt;&lt;/a&gt;&lt;/div&gt;&#8221;;<br />
}</p>
<p>}</p>
<p>$diggme = new diggme();</p></div>
<ul>
<li>The code will first create a class called <strong><em>diggme</em></strong>. Every time the plugin loads it will create an object of this class using <em><strong>$diggme = new diggme();</strong></em></li>
</ul>
<p><strong>The constructor</strong></p>
<ul>
<li><em><strong>add_action(&#8216;init&#8217;, array($this, &#8216;init&#8217;));</strong></em> -&gt; This will tell your blog to execute function <em><strong>init </strong></em>whenever it loads.</li>
<li><em><strong>add_action(&#8216;admin_menu&#8217;, array(&amp;$this, &#8216;setmenu&#8217;));</strong></em> -&gt; This will tell your blog to create menu at your admin page. You can place any settings here.</li>
<li><em><strong>add_filter(&#8216;the_content&#8217;, array(&amp;$this, &#8216;the_content_filter&#8217;));</strong></em> -&gt; This will be executed every time when your post loads. In this example we will load function <em><strong>the_content_filter </strong></em>every time the page loads, read the post content and add a digg button to the post.</li>
</ul>
<p>Other function is easy to understand if you have basic PHP skill. If you have any question just comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/how-to-make-wordpress-plugin-general/php-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Joomla detect if home page</title>
		<link>http://sourcecodemoney.com/joomla-detect-if-home-page/php-code/</link>
		<comments>http://sourcecodemoney.com/joomla-detect-if-home-page/php-code/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 16:21:34 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP code]]></category>
		<category><![CDATA[Code Lt]]></category>
		<category><![CDATA[Current]]></category>
		<category><![CDATA[Echo]]></category>
		<category><![CDATA[Joomla Home Page]]></category>
		<category><![CDATA[Php Server]]></category>
		<category><![CDATA[Request Uri]]></category>
		<category><![CDATA[Server Request]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=58</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		To detect if current page is Joomla hage page, do this code: &#60;?php $uri = $_SERVER['REQUEST_URI']; if ($uri == &#8220;/&#8221;) { echo &#8220;You&#8217;re on the homepage&#8221;; } ?&#62;]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/joomla-detect-if-home-page/php-code/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>To detect if current page is Joomla hage page, do this code:</p>
<div id="code">&lt;?php<br />
$uri = $_SERVER['REQUEST_URI'];<br />
if ($uri == &#8220;/&#8221;) {<br />
echo &#8220;You&#8217;re on the homepage&#8221;;<br />
}<br />
?&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/joomla-detect-if-home-page/php-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Set cookie with php</title>
		<link>http://sourcecodemoney.com/set-cookie-with-php/php-code/</link>
		<comments>http://sourcecodemoney.com/set-cookie-with-php/php-code/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 07:33:36 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP code]]></category>
		<category><![CDATA[Cookie]]></category>
		<category><![CDATA[Echo]]></category>
		<category><![CDATA[Get Cookie]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Php Cookie]]></category>
		<category><![CDATA[Set Cookie]]></category>
		<category><![CDATA[Value Time]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=8</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		Here&#8217;s the code to set and get cookie &#60;?php //set cookie setcookie(&#8220;Cookie1&#8243;, $value); setcookie(&#8220;Cookie2&#8243;, $value, time()+3600); //get cookie echo $_COOKIE["Cookie2"]; ?&#62;]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/set-cookie-with-php/php-code/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>Here&#8217;s the code to set and get cookie<br />
<code><br />
&lt;?php</code></p>
<p>//set cookie<br />
setcookie(&#8220;Cookie1&#8243;, $value);<br />
setcookie(&#8220;Cookie2&#8243;, $value, time()+3600);</p>
<p>//get cookie</p>
<p>echo $_COOKIE["Cookie2"];<br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/set-cookie-with-php/php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

