<?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>IMHO &#187; php</title>
	<atom:link href="http://www.iconeo.net/index.php/category/wordpress/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iconeo.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 02 May 2010 04:30:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Warning: Cannot modify header information</title>
		<link>http://www.iconeo.net/index.php/2010/04/warning-cannot-modify-header-information/</link>
		<comments>http://www.iconeo.net/index.php/2010/04/warning-cannot-modify-header-information/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 19:23:13 +0000</pubDate>
		<dc:creator>Chau Huh</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.iconeo.net/?p=46</guid>
		<description><![CDATA[<img class="alignleft size-full wp-image-47" title="stupid" src="http://www.iconeo.net/wordpress/wp-content/uploads/2010/04/stupid.jpg" alt="stupid" width="116" height="116" />Not being a php wizard I sorta freak out when I see odd messages like:
Warning: Cannot modify header information&#8230;
But never fear google is here. A quick lookup through a few posts reveals that this is caused by adding whitespaces, specifically the line breaks, into places inside of a php file where they should be. This is because the line&#8230; <a href="http://www.iconeo.net/index.php/2010/04/warning-cannot-modify-header-information/" class="read_more">more</a>]]></description>
			<content:encoded><![CDATA[<p><img  class="alignleft size-full wp-image-47" title="stupid" src="http://www.iconeo.net/wordpress/wp-content/uploads/2010/04/stupid.jpg" alt="stupid" width="116" height="116" />Not being a php wizard I sorta freak out when I see odd messages like:</p>
<blockquote><p>Warning: Cannot modify header information&#8230;</p></blockquote>
<p>But never fear google is here. A quick lookup through a few posts reveals that this is caused by adding whitespaces, specifically the line breaks, into places inside of a php file where they should be. This is because the line breaks in files are actual code that php gets stupid all over. The two main culprits are at the beginning or the end of a file.</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iconeo.net/index.php/2010/04/warning-cannot-modify-header-information/feed/</wfw:commentRss>
		<slash:comments>90</slash:comments>
		</item>
		<item>
		<title>Advanced Excerpt Plugin</title>
		<link>http://www.iconeo.net/index.php/2010/04/advanced-excerpt-plugin/</link>
		<comments>http://www.iconeo.net/index.php/2010/04/advanced-excerpt-plugin/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 18:24:30 +0000</pubDate>
		<dc:creator>Chau Huh</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iconeo.net/?p=31</guid>
		<description><![CDATA[I wanted to be able to adjust the_excerpt() php call so that I could customize the posts that showed on my homepage. Specifically I wanted to be able to keep any images from the post and have it show as part of the excerpt. Turns out that there is already a plugin for this! Check out <a href="http://wordpress.org/extend/plugins/advanced-excerpt/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/plugins/advanced-excerpt/?referer=');">Advance Excerpt</a> written by <a href="http://wordpress.org/extend/plugins/profile/basvd" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/plugins/profile/basvd?referer=');">Bas van Doren</a>.
It works really well and&#8230; <a href="http://www.iconeo.net/index.php/2010/04/advanced-excerpt-plugin/" class="read_more">more</a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to be able to adjust the_excerpt() php call so that I could customize the posts that showed on my homepage. Specifically I wanted to be able to keep any images from the post and have it show as part of the excerpt. Turns out that there is already a plugin for this! Check out <a href="http://wordpress.org/extend/plugins/advanced-excerpt/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/plugins/advanced-excerpt/?referer=');">Advance Excerpt</a> written by <a href="http://wordpress.org/extend/plugins/profile/basvd" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/plugins/profile/basvd?referer=');">Bas van Doren</a>.</p>
<p>It works really well and you can customize a lot of different settings in how your posts will display.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iconeo.net/index.php/2010/04/advanced-excerpt-plugin/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>file_get_contents() Alternative</title>
		<link>http://www.iconeo.net/index.php/2010/04/file_get_contents-alternative/</link>
		<comments>http://www.iconeo.net/index.php/2010/04/file_get_contents-alternative/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 16:52:47 +0000</pubDate>
		<dc:creator>Chau Huh</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.iconeo.net/?p=6</guid>
		<description><![CDATA[Being new to php I was totally unaware of this but in the move from php version 4 to 5 URL file-access is disabled in the server by default. This is to prevent cross site scripting attacks or XSS attacks. My first inclination was to have my server enable this feature but then they wanted to charge me money for it. So after some google searching and modifying of some&#8230; <a href="http://www.iconeo.net/index.php/2010/04/file_get_contents-alternative/" class="read_more">more</a>]]></description>
			<content:encoded><![CDATA[<p>Being new to php I was totally unaware of this but in the move from php version 4 to 5 URL file-access is disabled in the server by default. This is to prevent cross site scripting attacks or XSS attacks. My first inclination was to have my server enable this feature but then they wanted to charge me money for it. So after some google searching and modifying of some code this is what I came up with:</p>
<blockquote><p>
<code>function getPage($url, $referer, $timeout){<br />
if(!isset($timeout))<br />
$timeout=30;<br />
$curl = curl_init();<br />
if(strstr($referer,"://")){<br />
curl_setopt ($curl, CURLOPT_REFERER, $referer);<br />
}<br />
curl_setopt ($curl, CURLOPT_URL, $url);<br />
curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout);<br />
curl_setopt ($curl, CURLOPT_USERAGENT, sprintf("Mozilla/%d.0",rand(4,5)));<br />
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);<br />
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);<br />
$html = curl_exec ($curl);<br />
curl_close ($curl);<br />
return $html;<br />
}</code>
</p></blockquote>
<p>This function will need to be included in any file that uses the file_get_contents() call. If your trying to fix a wordpress theme this will probably go into your functions.php. Now You will need replace all of your file_get_contents() with the new call:</p>
<blockquote><p>
<code>getPage("http://YourDomain.Com", "http://google.com", "30");</code>
</p></blockquote>
<p>The 2nd variable in the call is your referer and the 3rd variable is the timeout. I suppose you could modify this so that the referer and timeout was hardcoded too. Let me know how it works!</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iconeo.net/index.php/2010/04/file_get_contents-alternative/feed/</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
	</channel>
</rss>

