<?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>Jacob Allred &#187; Web Dev</title>
	<atom:link href="http://www.jacoballred.com/category/web-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jacoballred.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 02:07:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Zend Alternatives</title>
		<link>http://www.jacoballred.com/web-dev/zend-alternatives/</link>
		<comments>http://www.jacoballred.com/web-dev/zend-alternatives/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 02:07:55 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=530</guid>
		<description><![CDATA[When most people think of PHP they think Zend, but did you know that Zend isn’t the only company that makes a PHP engine? There are many competing compilers and interpreters for PHP, each with their own slightly different take on the PHP language. Facebook’s HipHop HipHop takes normal PHP code and transforms it into [...]]]></description>
			<content:encoded><![CDATA[<p>When most people think of PHP they think Zend, but did you know that Zend isn’t the only company that makes a PHP engine? There are many competing compilers and interpreters for PHP, each with their own slightly different take on the PHP language.</p>
<h1>Facebook’s HipHop</h1>
<p>HipHop takes normal PHP code and transforms it into C++, which is then compiled in machine code. Code compiled by HipHop runs significantly faster than normal PHP run with the Zend Engine.</p>
<p>It has its disadvantages though. HipHop is only capable of transforming a subset of the PHP language. Some important (and some may say evil) features, such as <em>eval</em>, have been removed to make it possible to transform from PHP to C++. It also has a few other limitations, such as only supporting PHP 5.2 and 64-bit operating systems.</p>
<h1>IBM’s WebSphere sMash</h1>
<p>WebSphere sMash is a Java implementation of a PHP runtime environment. The PHP code is compiled into Java bytecode which runs on the Java Virtual Machine. The major benefit of running things in Java is that it is portable to more operating systems and allows you to use things like database connection pooling.</p>
<p>While it does support more PHP functionality than HipHop, it is still missing some features. However, it is capable of running a few major open source packages out of the box, including SugarCRM, Mediawiki, and WordPress.</p>
<h1>Caucho’s Quercus</h1>
<p>Quercus is another Java implementation of a PHP runtime environment.It too allows you to use Java features like connection pooling, and supports major open source packages like MediaWiki and WordPress.</p>
<p>The paid version allows you to pre-compile your PHP scripts, which allows them to run super-fast. Unfortunately, this is cost-prohibitive for users that have more than 1 CPU in their server (like me) or plan on having more than 1 CPU in the future (most anyone with a vaguely popular website).</p>
<h1>Phalanger</h1>
<p>Phalanger is a strange creature. It is sort of like PHP.NET. It takes your normal PHP code and compiles it into MSIL, which can then be run by .NET or Mono. The major advantage to using Phalanger is that it makes it possible to access .NET classes in PHP (for example, VB.NET or C#).</p>
<p>Thanks to Mono, .NET isn’t limited to Windows. This means you can write Gtk applications in PHP. I hope to have something released in the near future that uses Phalanger.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/my-sites/what-is-my-ip/" rel="bookmark" class="crp_title">What is my IP?</a></li><li><a href="http://www.jacoballred.com/web-dev/the-importance-of-bad-code/" rel="bookmark" class="crp_title">The importance of bad code</a></li><li><a href="http://www.jacoballred.com/web-dev/seed-the-clipboard-using-flash-10-and-zero-clipboard/" rel="bookmark" class="crp_title">Seed the clipboard using Flash 10 and Zero Clipboard</a></li><li><a href="http://www.jacoballred.com/goals/zend-certified-engineer/" rel="bookmark" class="crp_title">Zend Certified Engineer</a></li><li><a href="http://www.jacoballred.com/web-dev/chrome-frame/" rel="bookmark" class="crp_title">Chrome Frame</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/web-dev/zend-alternatives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DoS using a single client</title>
		<link>http://www.jacoballred.com/web-dev/dos-using-a-single-client/</link>
		<comments>http://www.jacoballred.com/web-dev/dos-using-a-single-client/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 16:30:14 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=524</guid>
		<description><![CDATA[Have you ever heard of Slowloris? It has been around for a little over a year, but fortunately I have never had the “pleasure” of dealing with it. This short Perl script (less than 350 lines of actual code) is capable of turning your lowly desktop computer into a server killing monster. Traditional denial of [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever heard of <a href="http://en.wikipedia.org/wiki/Slowloris">Slowloris</a>? It has been around for a little over a year, but fortunately I have never had the “pleasure” of dealing with it.</p>
<p>This short Perl script (less than 350 lines of actual code) is capable of turning your lowly desktop computer into a server killing monster. Traditional denial of service attacks use several clients (hundreds, sometimes thousands) to overwhelm the target server. The clients make as many requests as they can from the target server, causing it to use all its resources responding to the requests. Slowloris has a different approach.</p>
<p>Instead of using hundreds of clients, a Slowloris attack can often be successful run from a single client. And instead of overloading the server and utilizing a pile of bandwidth, Slowloris leaves the load on the target server at near zero and uses almost no bandwidth. It still makes a pile of requests, but it makes .…. them .…. nice .…. and .…. slow. Most web servers are only capable of handling a certain number of requests at a time (say, 150) so if you start 150 requests to the target server and leave those requests open for 10, 20, or even 30 minutes, you’ve effectively made it impossible for anyone else to get a valid request through to the web server. The target server isn’t actually doing any work, so the load doesn’t go up. What makes it even more annoying is the requests don’t show up in the log until they fail, if they ever do, which makes it more difficult to figure out what the heck is going on.</p>
<p>There are <a href="http://blogs.n1zyy.com/n1zyy/2009/06/20/slowloris-part-ii/">ways</a> to <a href="http://en.wikipedia.org/wiki/Slowloris#Mitigating_the_Slowloris_attack">mitigate</a> the effectiveness of this type of attack, the most common being the use of a proxy to sit between the client and the web server (like haproxy or <a href="http://www.cloudflare.com">CloudFlare</a>) and/or installing a bunch of Apache modules. Fortunately I’m doing both so hopefully I’ll be fine if someone decides they don’t like me much and wants to take down my server.</p>
<p>As a final note, I wholeheartedly <strong><em>discourage</em></strong> you from trying out the software unless you only do it on your local network. Attacking someone’s server is probably illegal and is likely to get your internet service shutoff. In other words, don’t be stupid.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/my-sites/save-money-and-make-your-site-faster-using-a-cdn/" rel="bookmark" class="crp_title">Save money AND make your site faster using a CDN</a></li><li><a href="http://www.jacoballred.com/free-stuff/cloudflare-rocks/" rel="bookmark" class="crp_title">CloudFlare Rocks!</a></li><li><a href="http://www.jacoballred.com/web-dev/quick-and-easy-php-whois-script/" rel="bookmark" class="crp_title">Quick and Easy PHP WHOIS Script</a></li><li><a href="http://www.jacoballred.com/free-stuff/protecting-your-server-with-denyhosts/" rel="bookmark" class="crp_title">Protecting Your Server with DenyHosts</a></li><li><a href="http://www.jacoballred.com/web-dev/all-the-domains-in-the-world/" rel="bookmark" class="crp_title">All The Domains in the World</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/web-dev/dos-using-a-single-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All The Domains in the World</title>
		<link>http://www.jacoballred.com/web-dev/all-the-domains-in-the-world/</link>
		<comments>http://www.jacoballred.com/web-dev/all-the-domains-in-the-world/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 02:34:38 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=513</guid>
		<description><![CDATA[After waiting months I’ve finally been given access to the .com TLD zone file! (And the .net, but who cares about .net, right?) So what is a zone file, you ask? Basically this file keeps track of how to access every .com domain name in the entire world. Well, technically not all of them, just [...]]]></description>
			<content:encoded><![CDATA[<p>After waiting <em>months</em> I’ve <em>finally</em> been given <a href="http://www.verisign.com/domain-name-services/domain-information-center/tld-zone-access/index.html">access</a> to the .com TLD zone file! (And the .net, but who cares about .net, right?)</p>
<p>So what is a zone file, you ask? Basically this file keeps track of how to access every .com domain name in the entire world. Well, technically not all of them, just the ones that have name servers associated with them, but practically all of them. So how many .com’s are there in the zone file? Over 88 million! Holy cow that is a lot of domains!</p>
<p>So the first problem is <em>how</em> to use the zone file. It is a 6.5 GB text file so you can’t just open it up and say “hey is jacoballred.com taken?” and expect a quick reply. On top of that, it isn’t even designed to give you a list of taken domain names, that is just a happy side effect of keeping track of how to access all the .com’s in the world.</p>
<p>My solution was to preprocess the data using a few Linux utilities, then load it into MySQL.</p>
<p>The zone file looks a little like this:</p>
<pre> NS E.GTLD-SERVERS.NET.
 NS M.GTLD-SERVERS.NET.
$TTL 172800
ENERCONTECHNOLOGIES NS NS1.BIZ.RR
ENERCONTECHNOLOGIES NS NS2.BIZ.RR
SELF-DRIVE-CAR-RENTAL NS NS3.IZP</pre>
<p>None of the domains in the file have .com on the end. Each of these lists a nameserver after it. There are also non-TLD domains (nameservers) that I don’t care about, and other random markers in the file ($TTL). All I want are the domain names, so I use Linux to strip out the stuff I don’t want:</p>
<pre>sed -e '/^[^A-Z0-9]/d' -e '/^$/d' -e 's/ .*$//' -e /[^A-Z0-9\-]/d com.zone \
| sort -u \
| awk -F "" '{close(f);f=$1}{print &gt; "com.zone.split."f}'</pre>
<p>Wow doesn’t that look fun? So lets go over it.</p>
<p>That first line uses <em>sed</em> to load in the zone file (com.zone) and remove all lines that don’t start with A-Z or 0–9 (the only valid characters for the first character of a .com domain), then it removes blank lines, then it removes all but the first word on each line (gets rid of the nameserver after the domain name), and finally removes any line that has characters that aren’t allowed in a domain (anything other than A-Z, 0–9, or a dash). This gets a list of JUST the domain names (without the .com), but has duplicates and they aren’t in any particular order.</p>
<p>The next line sorts the list of domains and removes duplicates.</p>
<p>The last line uses <em>awk</em> to split the list of domains into 36 separate files, one for each starting character (A-Z, 0–9). This isn’t technically needed but makes things more convenient.</p>
<p>My server is pretty wussy (1GB of RAM) so I’m preprocessing on my fast 8GB of RAM desktop at home. So I kick off that command and 20 minutes later I have files ready to be loaded into MySQL.</p>
<p>My table structure is pretty basic. I have 1 table for each letter/number (for performance) that has a numeric primary key and a varchar for the domain name. So I run this for each letter and number:</p>
<pre>DROP TABLE IF EXISTS `com_A`;

CREATE TABLE `com_zone`.`com_A` (
    `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    `name` VARCHAR( 255 ) NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;</pre>
<p>Next I use LOAD DATA INFILE to quickly pull in the data:</p>
<pre>LOAD DATA INFILE '/path/to/file/com.zone.split.A' INTO TABLE `com_A` (name);</pre>
<p>This step took about 5 minutes total for all the processed files. It is super super fast, but we still have one step left. Without an index on the name field, queries are really slow (about 2 seconds for a single domain). So we add an index to each table:</p>
<pre>ALTER TABLE `com_A` ADD UNIQUE `name` ( `name` ( 255 ) );</pre>
<p>This step was painfully slow, about 40 minutes, but once it was done I could do pretty much any query in a fraction of a second.</p>
<p>The final step was to turn off MySQL on my desktop, copy the MyISAM files to my server, then restart MySQL on my server so it could use them. Woot! I know have nearly every .com in the world on my server, ready to tell any web app I want if a domain is available or not with a high degree of confidence. I have a couple really fun webpages in the works that will use this.</p>
<p>Well that was a bit of a ramble but should be enough to get someone else in my position on the road to domain goodness!</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/rants/crappy-hosting-company/" rel="bookmark" class="crp_title">Crappy hosting company</a></li><li><a href="http://www.jacoballred.com/random/weighted-randomness-using-php-and-mysql/" rel="bookmark" class="crp_title">Weighted Randomness using PHP and MySQL</a></li><li><a href="http://www.jacoballred.com/my-sites/fix-capitalized-words-in-a-mysql-table/" rel="bookmark" class="crp_title">Fix capitalized words in a MySQL table</a></li><li><a href="http://www.jacoballred.com/my-sites/what-is-my-ip/" rel="bookmark" class="crp_title">What is my IP?</a></li><li><a href="http://www.jacoballred.com/free-stuff/cloudflare-rocks/" rel="bookmark" class="crp_title">CloudFlare Rocks!</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/web-dev/all-the-domains-in-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CloudFlare Rocks!</title>
		<link>http://www.jacoballred.com/free-stuff/cloudflare-rocks/</link>
		<comments>http://www.jacoballred.com/free-stuff/cloudflare-rocks/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 16:36:11 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[Free Stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=500</guid>
		<description><![CDATA[I recently got invited to try out CloudFlare, a new free service in closed beta. I checked out the homepage and was greeted with a “Wouldn’t it be cool if your website were protected by ninjas?” header. Why, yes, that would be cool. So, not really understanding exactly what it was, I signed up and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jacoballred.com/wp-content/uploads/2010/07/cloudflare-logo.png"><img class="size-full wp-image-501 alignright" title="CloudFlare Logo" src="http://www.jacoballred.com/wp-content/uploads/2010/07/cloudflare-logo.png" alt="" width="305" height="50" /></a>I recently got invited to try out <a href="http://www.cloudflare.com">CloudFlare</a>, a new free service in closed beta. I checked out the homepage and was greeted with a “Wouldn’t it be cool if your website were protected by ninjas?” header. Why, yes, that would be cool.</p>
<p>So, not really understanding exactly what it was, I signed up and configured it for the <a href="http://www.fakenamegenerator.com">Fake Name Generator</a>.</p>
<p>After some poking around and letting it do its thing for a few days, this is what I’ve discovered it does for me:</p>
<ul>
<li><strong>Provides a free DNS management.</strong> This is included for free with many registrars, but it just so happened that the domain I’m trying this out on didn’t come with DNS management so I’ve been paying $10 a year for it. This alone makes CloudFlare worth using for me.</li>
<li><strong>Serves my content on a CDN-like intrastructure.</strong> This makes my site faster to some users, which is always a good thing.</li>
<li><strong>Caches my static content (like images and JavaScript).</strong> This dramatically reduces my server load, and makes my site faster. My LAMP server with only 1GB of RAM is currently serving about 100,000 pageviews per day <em>and</em> running millions of queries in offline processes. With CloudFlare, my load average rarely goes above 0.10.</li>
<li><strong>Blocks bad guys.</strong> This is a <em>huge</em> deal for me. Everyone and their mom thinks it is okay to scrape my site for data. Bots love to hit my site to try to find exploits. CloudFlare does a great job at identifying these people and blocking them for me, or providing a way for them to enter a captcha to prove they aren’t a bot.</li>
<li><strong>Provides geolocation data on all visitors.</strong> I haven’t started using this yet, but CloudFlare adds a request header with the visitor’s geographic location. This makes it easier to target content to visitors from certain parts of the world.</li>
<li><strong>Makes me more profitable.</strong> All around, CloudFlare has made my business more profitable. My site requires less server resources, which means I can keep my site running on my relatively cheap tiny server. Fewer bots are loading my ads, which means my click thru rates are higher, which means I get paid more. My pages respond faster, which means I’m ranked higher in the search engines, which means I get more visitors.</li>
</ul>
<p>One problem I ran into, however, is occasionally a screen scraper gets through their blocks and starts hitting my site. In the past I would use iptables to block them, but the way CloudFlare works makes that impossible (at least with my limited knowledge of iptables). CloudFlare provides a way to block a specific IP, but it can take several minutes to go into effect.</p>
<p>The solution I came up with is to use Apache to give visitor’s from the offending IP a 403 error:</p>
<pre>&lt;VirtualHost *&gt;

 SetEnvIf CF-Connecting-IP 98.17.241.185 GoAway=1

 &lt;Directory "/path/to/your/website"&gt;
 Order allow,deny
 Allow from all
 Deny from env=GoAway
 &lt;/Directory&gt;

&lt;/VirtualHost&gt;
</pre>
<p>This snippet, properly placed in the Apache config file, will cause Apache to look at a header set by CloudFlare, and if it matches the offending IP (in this case 98.17.241.185), it denies access to the site. You can add a nearly unlimited number of SetEnvIf statements to block any number of IPs.</p>
<p>Anyways, if you get an invite to CloudFlare, check it out! It is definitely worth it!</p>
<pre></pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/web-dev/dos-using-a-single-client/" rel="bookmark" class="crp_title">DoS using a single client</a></li><li><a href="http://www.jacoballred.com/my-sites/save-money-and-make-your-site-faster-using-a-cdn/" rel="bookmark" class="crp_title">Save money AND make your site faster using a CDN</a></li><li><a href="http://www.jacoballred.com/free-stuff/protecting-your-server-with-denyhosts/" rel="bookmark" class="crp_title">Protecting Your Server with DenyHosts</a></li><li><a href="http://www.jacoballred.com/my-sites/unexpected-traffic/" rel="bookmark" class="crp_title">Unexpected Traffic</a></li><li><a href="http://www.jacoballred.com/my-sites/php-mysql-or-mysqli/" rel="bookmark" class="crp_title">PHP: mysql or mysqli?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/free-stuff/cloudflare-rocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My First Firefox Add-on</title>
		<link>http://www.jacoballred.com/my-sites/my-first-firefox-add-on/</link>
		<comments>http://www.jacoballred.com/my-sites/my-first-firefox-add-on/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 22:18:24 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=494</guid>
		<description><![CDATA[Update (7/16/2010): The add-on got reviewed and approved! Yay! I’ve been wanting to make a Firefox add-on FOREVER, but have never found something worth making that hasn’t already been made (or isn’t way beyond my abilities to make). So I decided I’d start simple and make a search provider add-on for ABA Number Lookup. I [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update (7/16/2010):</strong> The add-on got<a href="https://addons.mozilla.org/en-US/firefox/addon/196149/"> reviewed and approved</a>! Yay!</em></p>
<p>I’ve been wanting to make a Firefox add-on FOREVER, but have never found something worth making that hasn’t already been made (or isn’t way beyond my abilities to make). So I decided I’d start simple and make a search provider add-on for <a href="http://abanumberlookup.com">ABA Number Lookup</a>.</p>
<p>I found <a href="https://developer.mozilla.org/en/Creating_OpenSearch_plugins_for_Firefox">a page</a> in the Mozilla developer wiki that explains how to make an OpenSearch plugin. It is super easy. Basically it is just a snippet of XML that tells the browser where to send queries to, and how to get search suggestions. It also contains basic information like the name of the search engine and who wrote it. Easy stuff.</p>
<p>It took about 30 minutes to modify ABA Number Lookup to be able to return search suggestions and to send the proper MIME header for the OpenSearch XML file. After that was done, I went to the <a href="https://addons.mozilla.org/en-US/developers/addon/submit">“submit an addon” page</a>, followed the instructions, and wham! My search engine add-on is <a href="https://addons.mozilla.org/en-US/firefox/addon/196149/">available to the world</a>!</p>
<p>Mozilla puts all new add-ons in a sandbox to make it a little harder to push malicious code. This is just a search add-on so I think it should pretty quickly get approved and the download page will look a little less scary.</p>
<p>Anyways, it was fun! I might write one for <a href="http://www.rhyta.com">Rhyta Arcade</a> just for fun, though I doubt anyone would actually use that one.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/free-stuff/songbird/" rel="bookmark" class="crp_title">Songbird</a></li><li><a href="http://www.jacoballred.com/my-sites/making-a-popular-game-site/" rel="bookmark" class="crp_title">Making a Popular Game Site</a></li><li><a href="http://www.jacoballred.com/free-stuff/new-aba-number-search-site/" rel="bookmark" class="crp_title">New ABA number search site</a></li><li><a href="http://www.jacoballred.com/my-sites/accessing-the-android-market-in-the-emulator/" rel="bookmark" class="crp_title">Accessing the Android Market in the Emulator</a></li><li><a href="http://www.jacoballred.com/my-sites/pic-code-site/" rel="bookmark" class="crp_title">PIC Code Site</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/my-sites/my-first-firefox-add-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing the Android Market in the Emulator</title>
		<link>http://www.jacoballred.com/my-sites/accessing-the-android-market-in-the-emulator/</link>
		<comments>http://www.jacoballred.com/my-sites/accessing-the-android-market-in-the-emulator/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 21:06:26 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=492</guid>
		<description><![CDATA[Update (7/14/2010): The developer of the Fake Name Generator app has gotten in touch with me and we have settled our differences. He didn’t mean any harm, and I’m quite a bit excited about having an Android app that uses my website. Expect awesome app goodness in the next few days! Google has this awesome [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update (7/14/2010):</strong> The developer of the Fake Name Generator app has gotten in touch with me and we have settled our differences. He didn’t mean any harm, and I’m quite a bit excited about having an Android app that uses my website. Expect awesome app goodness in the next few days!</em></p>
<p>Google has this awesome <a href="http://www.google.com/alerts">alert service</a> that lets you set up search queries and have new search results from them emailed to you automatically. For example, I have “jacob allred” as a query, so anything new with my name in it pops up in my email.</p>
<p>On Saturday night, I got an alert email from Google for “fake name generator”. Turns out somebody made a Fake Name Generator Android application and put it in the Android Market. “Well that is strange,” I thought to myself. “I don’t remember giving anyone permission to steal my content.” The guy stole my product name, logo, look and feel of my site, layout of my site, and my content. And to make it worse, his app has an ad on it so he is making money off my product while I’m stuck paying the bill for the server that powers it.</p>
<p>I decided to try to be a good person first, and try to contact the developer and see if we can work something out. Turns out the Market doesn’t really require developers to provide contact information. Lame. I managed to find an email address but I’m not sure if the developer actually reads it. I sent an email to him letting him know I’m not thrilled about his app and that I’d prefer to work out a way for him to continue using my services (using the API instead of screen scraping) in a way where we can both get paid.</p>
<p>Next step is to try to notify Google of the copyright infringement. Google has <a href="http://www.google.com/android_dmca.html">detailed instructions</a> on how to file a Digital Millennium Copyright Act infringement notification, but it requires either faxing (I don’t have a fax) or mailing (which takes days). Neither is a great option.</p>
<p>My last option is to try to break the app. This requires downloading the app and then viewing my logs to see what it looks like when it scrapes my site. Should be easy, right? Not exactly. I don’t have an Android phone and apparently the Market isn’t available on the emulator. Lame.</p>
<p>Luckily, with much searching, I found <a href="http://tech-droid.blogspot.com/2009/11/android-market-on-emulator.html">this blog post</a> that explains how to get the Market working in the emulator (albeit with an older API version). I ended up having to download the 1.6 image he posted on 4shared.com, but at least it works. Once I got the Market working, I quickly downloaded the app and broke it. That should get the developer’s attention. ;)</p>
<p>Anyways, if you are an Android, iPhone, or Palm app developer and want to make a legitimate fully-sanctioned application, shoot me an email. I’m interested in paying someone to write apps for all of those platforms, or in working out a revenue sharing option.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/money/mobile-money/" rel="bookmark" class="crp_title">Mobile Money</a></li><li><a href="http://www.jacoballred.com/money/ridiculous-ad-networks/" rel="bookmark" class="crp_title">Ridiculous Ad Networks</a></li><li><a href="http://www.jacoballred.com/web-dev/making-a-theater-showtime-listings-website/" rel="bookmark" class="crp_title">Making a Theater Showtime Listings Website</a></li><li><a href="http://www.jacoballred.com/random/yup/" rel="bookmark" class="crp_title">Yup.</a></li><li><a href="http://www.jacoballred.com/my-sites/my-first-firefox-add-on/" rel="bookmark" class="crp_title">My First Firefox Add-on</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/my-sites/accessing-the-android-market-in-the-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a Theater Showtime Listings Website</title>
		<link>http://www.jacoballred.com/web-dev/making-a-theater-showtime-listings-website/</link>
		<comments>http://www.jacoballred.com/web-dev/making-a-theater-showtime-listings-website/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 14:14:32 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=472</guid>
		<description><![CDATA[I recently made a Flash arcade site that has been quite a bit more successful than I expected. I also made a word unscrambler site that has been doing pretty well. So I thought, if I can make these sites and earn money off of them even when the market is already flooded with similar [...]]]></description>
			<content:encoded><![CDATA[<p>I recently made a <a href="http://www.rhyta.com/">Flash arcade site</a> that has been quite a bit more successful than I expected. I also made a <a href="http://www.wordunscrambler.info/">word unscrambler</a> site that has been doing pretty well. So I thought, if I can make these sites and earn money off of them even when the market is already flooded with similar sites, then why not make a movie showtime listings website?</p>
<p>The first step was to find some data. I was planning on using Ignyte Software’s free <a href="http://www.ignyte.com/webservices/ignyte.whatsshowing.webservice/moviefunctions.asmx?op=GetTheatersAndMovies">movie API</a>, but that recently stopped working. Bummer.</p>
<p>I decided maybe I’d use isnoop.net’s <a href="http://isnoop.net/rss/theater.php">movie RSS feed</a>, but they got shut down by Google.</p>
<p>After reading online, I discovered that the big companies that collect theater data <em>can’t</em> copyright their data (because it is a collection of facts) and so it is legal to screen scrape and display the data elsewhere, but I hate screen scraping other sites (because I hate it when people screen scrape me) and it doesn’t matter whether it is legal or not, Google can still sue me into oblivion for doing it.</p>
<p>So my last option was to purchase the data. This took a lot of work to figure out who even sells the data. After some digging, I found that there are 2 companies in the US that sell theater showtime listings: <a href="http://westworldmedia.com/movies.asp">West World Media</a> and <a href="http://www.tribune.com/">Tribune Company</a>.</p>
<p>Both offer a data feed that you can download that includes all the showtime listings for the US. Both want $1500/month for this privilege. That is the <em>minimum</em>, the pricing scales based on usage.</p>
<p>Both offer an API you can call to get listings just for a specific zip code. While this is cheaper (around $500/month if I remember correctly), you also have to pay for each query and you can only search by zip code.</p>
<p>So the end result? No theater showtime listings website. Wayyy too much money. If you happen to be rich and can drop $1500/month for such a thing, I’d recommend West World Media. You get way more for your money (including movie reviews), and they just seemed to have their act together better than Tribune.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/my-sites/unexpected-traffic/" rel="bookmark" class="crp_title">Unexpected Traffic</a></li><li><a href="http://www.jacoballred.com/goals/updated-cost-of-food-page/" rel="bookmark" class="crp_title">Updated Cost of Food Page</a></li><li><a href="http://www.jacoballred.com/money/rhyta-arcade/" rel="bookmark" class="crp_title">Rhyta Arcade</a></li><li><a href="http://www.jacoballred.com/free-stuff/new-aba-number-search-site/" rel="bookmark" class="crp_title">New ABA number search site</a></li><li><a href="http://www.jacoballred.com/my-sites/making-a-popular-game-site/" rel="bookmark" class="crp_title">Making a Popular Game Site</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/web-dev/making-a-theater-showtime-listings-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word Unscrambler</title>
		<link>http://www.jacoballred.com/my-sites/word-unscrambler/</link>
		<comments>http://www.jacoballred.com/my-sites/word-unscrambler/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 15:39:12 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=450</guid>
		<description><![CDATA[If you haven’t heard, I’m moving to Connecticut next Thursday. We haven’t finished packing, but I still found the time to make a new webpage: WordUnscrambler.info. Here is how it works: I loaded several popular Scrabble dictionaries into a table. I loaded Wiktionary into a table. I created a form that lets a user entered [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven’t heard, I’m moving to Connecticut next Thursday. We haven’t finished packing, but I still found the time to make a new webpage: <a href="http://www.wordunscrambler.info">WordUnscrambler.info</a>.</p>
<p>Here is how it works:</p>
<ol>
<li>I loaded several popular Scrabble dictionaries into a table.</li>
<li>I loaded <a href="http://www.wiktionary.org">Wiktionary</a> into a table.</li>
<li>I created a form that lets a user entered a scrambled word (like EMURLNRASBC).</li>
<li>When the user clicks “Unscramble”, I unscramble the word for them:
<ol>
<li>I query the dictionary table to find all words that contain all the letters (and the proper amount of each letter) and is the proper length. So in this example, we need all words with two R’s and one of each of those other letters, and it needs to be eleven characters long.</li>
<li>I join this list with the Wiktionary table and find out how many definitions there are for each word.</li>
<li>I sort the list so the words with the most definitions are on top. This helps a little to prevent obscure words from being listed first in situations where there are several words made up of the same letters.</li>
</ol>
</li>
<li>I display all the words that are made from the scrambled letters.</li>
</ol>
<p>It didn’t take too long to make, and <a href="http://www.beccaallred.com">my wife</a> made an awesome logo for it.</p>
<p>So what does EMURLNRASBC unscramble to? Visit <a href="http://www.wordunscrambler.info">Word Unscrambler</a> and find out!</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/my-sites/fix-capitalized-words-in-a-mysql-table/" rel="bookmark" class="crp_title">Fix capitalized words in a MySQL table</a></li><li><a href="http://www.jacoballred.com/web-dev/making-a-theater-showtime-listings-website/" rel="bookmark" class="crp_title">Making a Theater Showtime Listings Website</a></li><li><a href="http://www.jacoballred.com/web-dev/all-the-domains-in-the-world/" rel="bookmark" class="crp_title">All The Domains in the World</a></li><li><a href="http://www.jacoballred.com/random/weighted-randomness-using-php-and-mysql/" rel="bookmark" class="crp_title">Weighted Randomness using PHP and MySQL</a></li><li><a href="http://www.jacoballred.com/reviews/review-anathem/" rel="bookmark" class="crp_title">Review: Anathem</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/my-sites/word-unscrambler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lossless image optimization — even for JPG!</title>
		<link>http://www.jacoballred.com/my-sites/lossless-image-optimization-even-for-jpg/</link>
		<comments>http://www.jacoballred.com/my-sites/lossless-image-optimization-even-for-jpg/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 15:55:04 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[My Sites]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=414</guid>
		<description><![CDATA[As you may know, I run an arcade site. It is doing fairly well, but I’m always looking for ways to gain an edge that will put me ahead of the competition. The most recent thing I am trying is image optimization. With the announcement by Google that they are adding site speed to their [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know, I run an <a href="http://www.rhyta.com">arcade site</a>. It is doing fairly well, but I’m always looking for ways to gain an edge that will put me ahead of the competition.</p>
<p>The most recent thing I am trying is image optimization. With the announcement by Google that they are adding site speed to their page ranking equation, it is more important than ever to have a fast site.</p>
<p>I get all my games and game thumbnails from Mochi, a free source for Flash games. I’ve written code to do this all automatically for me. The problem is, some game authors think it is okay to include a 200KB thumbnail (they are only 100x100px!). Alone this might not be the end of the world, but when you get a page of 50 thumbnails and each is 60KB to 200KB, then you have a problem.</p>
<p>The solution? Image optimization!</p>
<p>It is important to note that image optimization is <strong>not</strong> image compression. Compression generally results in degraded image quality. Optimization programs take the image file that already exists, and re-organizes the data in the image file so that the end result is the same, but it takes up less space. Optimization programs sometimes also remove data that isn’t relevant to the display of the image, like unused colors in a GIF color palette or EXIF data in a JPG.</p>
<p>I had a <em>really</em> hard time finding a JPG optimization program that didn’t reduce the quality of the picture, but finally found a 5 year old package that does the job great: <a href="http://linuxgazette.net/119/lindholm.html">littleutils</a>. <em>Note: The download link on that page is wrong, <a href="http://sourceforge.net/projects/littleutils/">try this one</a> instead.</em></p>
<p>This collection of little utilities includes 3 great image optimizers for Linux: opt-png, opt-jpg, opt-gif. These items do a brute-force style optimization of the image, trying many methods until it finds the method that produces the smallest file size for each individual image. Even though these tools are 5 years old, the opt-png utility produced smaller file sizes than the popular pngcrush and pngout utilities, and the punypng web service. Amazing!</p>
<p>By using these tools, I reduced the file size of my thumbnails by an average of <em><strong>35%</strong></em>! That is a huge difference, and will make a huge difference to my visitors.</p>
<p>I’ve also updated my automated game downloading script to tie into these utilities, so the optimization happens without me having to ever touch it.</p>
<p><em>If you need help installing these utilities, let me know. There were a lot of optional dependencies that made a <span style="text-decoration: underline;">huge</span> difference in the size of the optimized files, so make sure you install all of them before compiling littleutils.</em></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/my-sites/making-a-popular-game-site/" rel="bookmark" class="crp_title">Making a Popular Game Site</a></li><li><a href="http://www.jacoballred.com/web-dev/making-eclipse-for-php-useful/" rel="bookmark" class="crp_title">Making Eclipse for PHP Useful</a></li><li><a href="http://www.jacoballred.com/web-dev/raphael-javascript-library/" rel="bookmark" class="crp_title">Raphaël JavaScript Library</a></li><li><a href="http://www.jacoballred.com/money/rhyta-arcade/" rel="bookmark" class="crp_title">Rhyta Arcade</a></li><li><a href="http://www.jacoballred.com/web-dev/automatic-js-broken-image-replacement/" rel="bookmark" class="crp_title">Automatic JS Broken Image Replacement</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/my-sites/lossless-image-optimization-even-for-jpg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raphaël JavaScript Library</title>
		<link>http://www.jacoballred.com/web-dev/raphael-javascript-library/</link>
		<comments>http://www.jacoballred.com/web-dev/raphael-javascript-library/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 22:18:25 +0000</pubDate>
		<dc:creator>Jacob Allred</dc:creator>
				<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.jacoballred.com/?p=407</guid>
		<description><![CDATA[I’ve been playing with the Raphaël JavaScript library this weekend quite a bit, and I really like it. Raphaël lets you programmatically draw and animate vector graphics on the web. What I really want to do with it is to dynamically generate avatars to be used on the Fake Name Generator. For example, the code [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been playing with the <a href="http://raphaeljs.com/">Raphaël JavaScript library</a> this weekend quite a bit, and I really like it. Raphaël lets you programmatically draw and animate vector graphics on the web.</p>
<p>What I really want to do with it is to dynamically generate avatars to be used on the <a href="http://www.fakenamegenerator.com/">Fake Name Generator</a>. For example, the code would pick a skin color from a predetermined range of skin tones, a hair style, a hair color, lip style, lip color, eye shape, eye color, etc etc. It would then layer all these items together into an SVG graphic. Using a bit of JavaScript, I could even make the eyes blink every few seconds. If needed/desired, this SVG graphic could then be converted to a PNG image.</p>
<p>But that is a bigger task than I’m ready to really start at the moment, so instead I’m playing around making a simple <a href="http://www.jacoballred.com/labs/raphael-match/">matching game</a>. The goal is to create a mix of PHP and Raphaël to allow the developer to define a list of images that are used to automatically create a matching game. Unlike most matching games available online, mine will allow the developer to specify two different images that match. For example, a picture of a person and an image with the person’s name would be a matching set. Or a picture of state and a picture of the state’s flag. Things like that.</p>
<p>I haven’t gotten very far yet. As of this writing, all it can do is generate 3 pairs of cards. Each pair of cards has a different color. The game lets you click cards and try to match them. Very basic.</p>
<p>Once it is finished, I plan on releasing the source code under a friendly license and then using it on an LDS gaming site I’m working on.</p>
<p>Anyways, check out the <a href="http://www.jacoballred.com/labs/raphael-match/">matching game</a> or the demos at <a href="http://raphaeljs.com/">Raphaël</a>.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jacoballred.com/my-sites/lossless-image-optimization-even-for-jpg/" rel="bookmark" class="crp_title">Lossless image optimization — even for JPG!</a></li><li><a href="http://www.jacoballred.com/my-sites/making-a-popular-game-site/" rel="bookmark" class="crp_title">Making a Popular Game Site</a></li><li><a href="http://www.jacoballred.com/web-dev/making-eclipse-for-php-useful/" rel="bookmark" class="crp_title">Making Eclipse for PHP Useful</a></li><li><a href="http://www.jacoballred.com/web-dev/automatic-js-broken-image-replacement/" rel="bookmark" class="crp_title">Automatic JS Broken Image Replacement</a></li><li><a href="http://www.jacoballred.com/my-sites/false-identity-generator/" rel="bookmark" class="crp_title">False Identity Generator</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.jacoballred.com/web-dev/raphael-javascript-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
