<?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>riaanlos.nl</title>
	<atom:link href="http://www.riaanlos.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.riaanlos.nl</link>
	<description>webdesign &#38; webdevelopment</description>
	<lastBuildDate>Sun, 06 Nov 2011 20:35:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Ringtone &#8216;The Phone&#8217;</title>
		<link>http://www.riaanlos.nl/ringtone-the-phone/</link>
		<comments>http://www.riaanlos.nl/ringtone-the-phone/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 11:40:29 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Artikelen]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ringtone]]></category>

		<guid isPermaLink="false">http://www.riaanlos.nl/?p=46</guid>
		<description><![CDATA[Momenteel is het programma &#8216;The Phone&#8216; op de televisie te zien. Een spel waarin Eddy Zoëy twee willekeurige personen (die zich hebben opgegeven [...]]]></description>
			<content:encoded><![CDATA[<p>Momenteel is het programma &#8216;<a title="The Phone" href="http://www.rtl.nl/programma/thephone/home/" target="_blank">The Phone</a>&#8216; op de televisie te zien. Een spel waarin <a title="Eddy Zoëy" href="http://www.eddyzoey.nl/" target="_blank">Eddy Zoëy</a> twee willekeurige personen (die zich hebben opgegeven voor een mysterieus spel) op een willekeurig moment opbelt en ze de vraag stelt of ze mee willen doen aan het spel. Bij akkoord moeten de twee personen elkaar eerst zien te vinden. Daarna moeten de kandidaten vijf sleutels zien te vinden waarna een kluis met inhoud (beginnende bij €25.000,-) kunnen openen.</p>
<p>Het programma wordt gekenmerkt door een eigen ringtone. Leek me leuk om deze als ringtone voor mijn iPhone te gebruiken. Ik heb een multimedia bestand op internet gevonden en deze omgezet naar m4r, een formaat voor de iPhone. Hieronder is deze te downloaden, evenals een &#8216;gewone&#8217; mp3 bestand.</p>
<div class="download"><a href="http://www.riaanlos.nl/dl/The-Phone.m4r.zip" title="Download: The Phone - iPhone ringtone"><span class="download-image"><img src="http://www.riaanlos.nl/wp-content/themes/riaanlos/images/icon/download.png" alt="The Phone - iPhone ringtone" /></span><span class="download-title">The Phone - iPhone ringtone</span><span class="download-description">Zip containing the m4r file (iPhone ringtone)</span></a></div>
<div class="download"><a href="http://www.riaanlos.nl/dl/The-Phone.mp3" title="Download: The Phone ringtone"><span class="download-image"><img src="http://www.riaanlos.nl/wp-content/themes/riaanlos/images/icon/download.png" alt="The Phone ringtone" /></span><span class="download-title">The Phone ringtone</span><span class="download-description">MP3 file</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.riaanlos.nl/ringtone-the-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Form captcha</title>
		<link>http://www.riaanlos.nl/form-captcha/</link>
		<comments>http://www.riaanlos.nl/form-captcha/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 14:48:53 +0000</pubDate>
		<dc:creator>Riaan</dc:creator>
				<category><![CDATA[Artikelen]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://www.riaanlos.nl/?p=32</guid>
		<description><![CDATA[Form can generate spam if they&#8217;re not well programmed. A method to block spam is by adding a captcha field. This will generate [...]]]></description>
			<content:encoded><![CDATA[<p>Form can generate spam if they&#8217;re not well programmed. A method to block spam is by adding a captcha field. This will generate a (image) code and add it to the session. Every page load the code will be renewed. Visitors must enter the code inside an input field and the submit php code must check the user&#8217;s input with the session value.<span id="more-32"></span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php
session_start();

/*
*    CONFIGURATION
*/

$length = 4;

$color['font'] = 'B62C21';
$color['shadow'] = 'F7A400';
$color['bg'] = '8C0F14';

$font['size'] = 30;
$font['angle'] = 5;
$font['top'] = 38;
$font['left'] = 28;
$font['shadow']['top'] = 2;
$font['shadow']['left'] = 7;
$font['filename'] = 'tahoma_bold.ttf';

$block['width'] = 160;
$block['height'] = 38;

/*
*    START CODE
*/

// function: convert hexadecimal to rgb
function hex2rgb($hexadecimal='',$default=array(255,255,255)) {
 if (!ctype_xdigit($hexadecimal) || strlen($hexadecimal) != 6) {
 return array(255,255,255);
 }
 foreach (str_split($hexadecimal, 2) as $value) {
 $return[] = hexdec($value);
 }
 return $return;
}

// create random number
$start = '1';
$end = '';
for($i=1;$i&amp;lt;=($length-1);$i++) {
$start .= '0';
}
for($i=1;$i&amp;lt;=$length;$i++) {
$end .= '9';
}
$random_number = rand($start, $end);
$_SESSION['captcha_code'] = md5($random_number);

// init image
$images = imagecreatetruecolor($block['width'], $block['height']);

// set font colors
$color['font'] = hex2rgb($color['font']);
$color['font'] = imagecolorallocate($images, $color['font'][0],  $color['font'][1], $color['font'][2]);
$color['shadow'] = hex2rgb($color['shadow']);
$color['shadow'] = imagecolorallocate($images,  $color['shadow'][0],$color['shadow'][1],$color['shadow'][2]);
$color['bg'] = hex2rgb($color['bg']);
$color['bg'] = imagecolorallocate($images, $color['bg'][0],  $color['bg'][1], $color['bg'][2]);

// create rectangle
imagefilledrectangle($images, 0, 0, $block['width'], $block['height'],  $color['bg']);

// set font
$font_source = dirName(__FILE__) . '/' . $font['filename'];

// create numbers on rectangle
imagettftext($images, $font['size'], $font['angle'],  ($font['left']+$font['shadow']['left']),  ($font['top']-$font['shadow']['top']), $color['shadow'], $font_source,  $random_number);
imagettftext($images, $font['size'], $font['angle'], $font['left'],  $font['top'], $color['font'], $font_source, $random_number);

// disable cache
header(&quot;Expires: Wed, 1 Jan 1997 00:00:00 GMT&quot;);
header(&quot;Last-Modified: &quot; . gmdate(&quot;D, d M Y H:i:s&quot;) . &quot; GMT&quot;);
header(&quot;Cache-Control: no-store, no-cache, must-revalidate&quot;);
header(&quot;Cache-Control: post-check=0, pre-check=0&quot;, false);
header(&quot;Pragma: no-cache&quot;);

// generate output
header (&quot;Content-type: image/gif&quot;);
imagegif($images);
imagedestroy($images);
?&gt;﻿</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.riaanlos.nl/form-captcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

