<?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>Janeks random writings &#187; Web development</title>
	<atom:link href="http://www.hellqvist.com/janek/weblog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hellqvist.com/janek/weblog</link>
	<description>No, it's not another diary.</description>
	<lastBuildDate>Fri, 22 Jan 2010 23:45:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Filtering guestbook spam</title>
		<link>http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/#comments</comments>
		<pubDate>Sat, 16 Dec 2006 11:02:48 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/</guid>
		<description><![CDATA[Guestbooks, as well as all public forms on the WWW, are constantly abused nowadays by spam bots trying to fill them with spam links. In the guestbook for my band, I had a ratio of 1/10 &#8211; about 9 spams for every valid post. Here are the spam filtering techniques I implemented that worked for [...]]]></description>
			<content:encoded><![CDATA[<p>Guestbooks, as well as all public forms on the WWW, are constantly abused nowadays by spam bots trying to fill them with spam links. In the <a href="http://www.mindslip.net/interact.php">guestbook</a> for my <a href="http://www.mindslip.net/">band</a>, I had a ratio of 1/10 &#8211; about 9 spams for every valid post. Here are the spam filtering techniques I implemented that worked for me:</p>
<ul>
<li>First, a <strong>black list</strong>. I have an array with bad words (viagria, cialis, roulette, casino) which are common in spam posts and quite uncommon in valid guestbook entries. Every post is checked against the black list. The black list also contains a few URL:s that are often used by spammers (blogspot.com and hometown.aol.com) as well as the tag [url= which is probably BBcode.</li>
</ul>
<ul>
<li><strong>Link spamming</strong>. A quick check is made on the number of http:// links, if it’s above 5 &#8211; well, it’s most probably a spam!</li>
</ul>
<ul>
<li><strong>Cookie test</strong>. This is something I picked up on a mailing list a few weeks ago, and it works brilliantly. The idea is that spam bots aren’t valid browsers, they just look for forms and submit them. The trick is to set a cookie when the form is displayed, and then check for the existance of that cookie when the form is received, before it’s saved. If there’s no cookie &#8211; the post isn’t saved! This stops people with cookies disabled from entering posts, but it stops a LOT of spam.</li>
</ul>
<p>BTW, here&#8217;s my entire black list as of today:<br />
<em>levitra,viagra,cialis,porn,roulette,casino,hometown.aol.com,blogspot.com,[url= </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Maximum image size in WordPress 2</title>
		<link>http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 21:34:48 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/</guid>
		<description><![CDATA[There seems to be a hard-coded maximum size for images uploaded in WordPress 2.0 &#8211; images larger than 3 Mpixels aren&#8217;t resized into thumbnails for some odd reason (maybe not to stress the web server?).
If you think your web host has enough horse power to resize large images, go ahead and modify line 89 in [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be a hard-coded maximum size for images uploaded in WordPress 2.0 &#8211; images larger than 3 Mpixels aren&#8217;t resized into thumbnails for some odd reason (maybe not to stress the web server?).</p>
<p>If you think your web host has enough horse power to resize large images, go ahead and modify line 89 in <em>wp-admin/inline-uploading.php</em> and change the number three to something higher:</p>
<p><code>if ( $imagedata['width'] * $imagedata['height'] &lt; 3 * 1024 * 1024 ) {</code></p>
<p>This should be added to the <a href="http://codex.wordpress.org/Using_Image_and_File_Attachments">WordPress Codex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A javascript bookmarklet for converting timestamps</title>
		<link>http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/#comments</comments>
		<pubDate>Mon, 28 Nov 2005 14:00:56 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/</guid>
		<description><![CDATA[I spend a lot of time working with timestamps (unixtime aka epoch) in phpMyAdmin, and got really tired of either cut-and-paste:ing the timestamps to my home-made timestamp converter or adding &#8220;FROM_UNIXTIME(created)&#8221; to the SQL queries to get the timestamps in a readable format&#8230;
The other day I got the idea to make a bookmarklet that does [...]]]></description>
			<content:encoded><![CDATA[<p>I spend a lot of time working with <a href="http://en.wikipedia.org/wiki/Unix_epoch">timestamps</a> (unixtime aka epoch) in <a href="http://www.phpmyadmin.net/">phpMyAdmin</a>, and got really tired of either cut-and-paste:ing the timestamps to my home-made timestamp converter or adding &#8220;FROM_UNIXTIME(created)&#8221; to the SQL queries to get the timestamps in a readable format&#8230;</p>
<p>The other day I got the idea to make a <a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a> that does the conversion for me, and voilá! All you have to do is mark the timestamp and click the &#8220;Convert&#8221; bookmarklet. You&#8217;ll get an input field if you don&#8217;t mark anything.</p>
<p>Here&#8217;s the bookmarklet:<br />
<a href="javascript:q=document.getSelection();for(i=0;i<frames.length;i++){q=frames[i].document.getSelection();if(q)break;}if(!q)void(q=prompt('Enter timestamp:',''));if(q){d=new Date;d.setTime(q*1000);alert(d.toLocaleString())};">Convert timestamp</a> (Bookmark the link, don&#8217;t click it!)</p>
<p>Please let me know if you find it useful or think of a way to improve it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
