<?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>Application Developer &#187; development</title>
	<atom:link href="http://applicationdeveloper.net/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://applicationdeveloper.net</link>
	<description>Making money online</description>
	<lastBuildDate>Sat, 26 Sep 2009 20:31:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SEO Friendly Links and .htaccess Hacks</title>
		<link></link>
		<comments>http://applicationdeveloper.net/2009/07/13/seo-friendly-links-htaccess-tricks/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 23:17:36 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Tweaks]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://applicationdeveloper.net/?p=39</guid>
		<description><![CDATA[I&#8217;m going to assume most people know how to activate or edit their own .htaccess files. If you&#8217;re not sure how to edit them then visit this link.htaccess modifications can come in really handy when cleaning up some of the old management systems. For those that use Google Webmaster Tools, this can be a great [...]]]></description>
			<content:encoded><![CDATA[I&#8217;m going to assume most people know how to activate or edit their own .htaccess files. If you&#8217;re not sure how to edit them then visit <a href="http://en.wikipedia.org/wiki/Htaccess">this link</a>.<br /><br />htaccess modifications can come in really handy when cleaning up some of the old management systems. For those that use <a href="http://www.google.com/webmasters/" target="_blank">Google Webmaster Tools</a>, this can be a great way to clean up those nasty 404s. Also note the <a href="http://www.bing.com/webmaster" target="_blank">Bing Webmaster Area</a>. Many developers don&#8217;t build for SEO purposes and let other guys deal with it later. Sometimes they will even request a fee. Here&#8217;s a few tricks to save a couple bucks or clean up some links.<br /><br /><strong>1. Removing variables from your links</strong><br /><br />Ever wonder how sites that have nice friendly links to customer profiles do it? There are a number of methods but if you use php variables that come out like this:<br /><br />http://www.mywebsite.com/index.php?profile=customer_name<br /><br />Apply this short mod to your .htaccess file:<br /><br /><pre class="devcodeblock" title="HTML"><table class="devcodetools"><tbody><tr><td>&nbsp;HTML&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard6" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=6&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">RewriteRule ^profile\/(.*)$ index.php?profile=1 [L,QSA]</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<br />The result:<br /><br />http://mywebsite.com/profile/customer_name<p style="text-align: center;"><img class="size-full wp-image-44 aligncenter" title="SEO-Friendly-Images-Titles" src="http://applicationdeveloper.net/wp-content/uploads/2009/07/SEO-Friendly-Images-Titles.jpg" alt="SEO-Friendly-Images-Titles" width="383" height="272" /></p>
<br />Nice friendly links that everyone understands. Even the users.<br /><br /><br /><br /><strong>2. SEO Friendly 301 Redirects</strong><br /><br />This is probably the simplest and most useful htaccess. As developers, we change our minds all the time. If those changes ever include changing post names, moving folders, or just altering a link. Google Webmaster Tools is going to come knocking with a 404 error within the next couple days. Fix it with this:<br /><br /><pre class="devcodeblock" title="HTML"><table class="devcodetools"><tbody><tr><td>&nbsp;HTML&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard7" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=7&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">Redirect 301 /path/to/old/location /new/location</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<br /><em>/new/location</em> can also be a link like <em>http://new_website.com</em><br /><br /><em><br /></em><br /><br /><strong>3. Custom Error Pages</strong><br /><br />These just help you make a nice polished site. Particularly the 404 error page.<br /><br /><pre class="devcodeblock" title="HTML"><table class="devcodetools"><tbody><tr><td>&nbsp;HTML&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard8" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=8&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">ErrorDocument 401 /error/401.php</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">ErrorDocument 403 /error/403.php</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">ErrorDocument 404 /error/404.php</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">ErrorDocument 500 /error/500.php</pre></td></tr></table></div></pre>
<br /><br /><br /><strong>4. Block IPs Using htaccess</strong><br /><br />Handy when you just don't like someone, or a country, or you just hate that IP block<br /><br /><pre class="devcodeblock" title="HTML"><table class="devcodetools"><tbody><tr><td>&nbsp;HTML&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard9" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=9&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">allow from all</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">deny from 145.186.14.122</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">deny from 124.15</pre></td></tr></table></div></pre>
<br /><br /><br /><strong>5. Prevent Hotlinking</strong><br /><br />I get a lot requests for this one.<br /><br /><pre class="devcodeblock" title="HTML"><table class="devcodetools"><tbody><tr><td>&nbsp;HTML&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard10" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=10&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">Options +FollowSymlinks</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline"># Protect Hotlinking</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">RewriteEngine On</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">RewriteCond %{HTTP_REFERER} !^$</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">RewriteCond %{HTTP_REFERER} !^http://(www.)?domainname.com/ [nc]</pre></td></tr><tr><td class="devcodelines" width="1%">7</td><td class="devcodelinesarea"><pre class="devcode devcodeline">RewriteRule .*.(gif|jpg|png)$ http://domainname.com/img/hotlink_f_o.png [nc]</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">8</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<br />For more dry information on .htaccess. Here's a great blog on it:<br /><br /><a href="http://htaccess.wordpress.com/tag/htaccess-mod-rewrite/" target="_blank">http://htaccess.wordpress.com/tag/htaccess-mod-rewrite/</a>]]></content:encoded>
			<wfw:commentRss>http://applicationdeveloper.net/2009/07/13/seo-friendly-links-htaccess-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Post to Twitter using cURL</title>
		<link></link>
		<comments>http://applicationdeveloper.net/2009/07/12/post-twitter-curl/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 13:20:36 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://applicationdeveloper.net/?p=27</guid>
		<description><![CDATA[Having a choice of 50 Wordpress plugins are great when you are using Wordpress but what do you do when you have custom made software or don&#8217;t use Wordpress?Using this handy cURL php code, you can post to Twitter from anywhere on your website. You can include the code as is, or just stick it [...]]]></description>
			<content:encoded><![CDATA[Having a choice of 50 Wordpress plugins are great when you are using Wordpress but what do you do when you have custom made software or don&#8217;t use Wordpress?<br /><br />Using this handy cURL php code, you can post to Twitter from anywhere on your website. You can include the code as is, or just stick it into a function that you can include across all your scripts that need it.<br /><br /><pre class="devcodeblock" title="PHP"><table class="devcodetools"><tbody><tr><td>&nbsp;PHP&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard12" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=12&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">// Set username and password</pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">$username = '$username';</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">$password = '$password';</pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">// The message you want to send</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">$message = $TWITTER_POST;</pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">// The twitter API address</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">$url = 'http://twitter.com/statuses/update.xml';</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">// Alternative JSON version</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">// $url = 'http://twitter.com/statuses/update.json';</pre></td></tr><tr><td class="devcodelines" width="1%">11</td><td class="devcodelinesarea"><pre class="devcode devcodeline">// Set up and execute the curl process</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">12</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">$curl_handle = curl_init();</pre></td></tr><tr><td class="devcodelines" width="1%">13</td><td class="devcodelinesarea"><pre class="devcode devcodeline">curl_setopt($curl_handle, CURLOPT_URL, &quot;$url&quot;);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">14</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);</pre></td></tr><tr><td class="devcodelines" width="1%">15</td><td class="devcodelinesarea"><pre class="devcode devcodeline">curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">16</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">curl_setopt($curl_handle, CURLOPT_POST, 1);</pre></td></tr><tr><td class="devcodelines" width="1%">17</td><td class="devcodelinesarea"><pre class="devcode devcodeline">curl_setopt($curl_handle, CURLOPT_POSTFIELDS, &quot;status=$message&quot;);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">18</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">curl_setopt($curl_handle, CURLOPT_USERPWD, &quot;$username:$password&quot;);</pre></td></tr><tr><td class="devcodelines" width="1%">19</td><td class="devcodelinesarea"><pre class="devcode devcodeline">$buffer = curl_exec($curl_handle);</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">20</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">curl_close($curl_handle);</pre></td></tr><tr><td class="devcodelines" width="1%">21</td><td class="devcodelinesarea"><pre class="devcode devcodeline">// check for success or failure</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">22</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">if (empty($buffer)) {</pre></td></tr><tr><td class="devcodelines" width="1%">23</td><td class="devcodelinesarea"><pre class="devcode devcodeline">//    echo 'message';</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">24</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">} else {</pre></td></tr><tr><td class="devcodelines" width="1%">25</td><td class="devcodelinesarea"><pre class="devcode devcodeline">//    echo 'success';</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">26</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">}</pre></td></tr><tr><td class="devcodelines" width="1%">27</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<br />I commented out the messages but I left them in for debugging purposes. Just uncomment then and start testing. Here's the end result... as if we didn't know what it would look like anyway.<p style="text-align: center;"><img class="size-full wp-image-29 aligncenter" title="cURL Twitter Post" src="http://applicationdeveloper.net/wp-content/uploads/2009/07/curl-twitter-post.jpg" alt="cURL Twitter Post" width="427" height="220" /></p>
<br />This is really just a snippet, you can expand on this and even create forms that request the username and password for distributable scripts or replies from your traffic.]]></content:encoded>
			<wfw:commentRss>http://applicationdeveloper.net/2009/07/12/post-twitter-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->