<?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>Reza A Tabibazar.</title>
	<atom:link href="http://www.rxt7.com/log/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.rxt7.com/log</link>
	<description>Just another weblog</description>
	<lastBuildDate>Fri, 21 Sep 2007 11:35:46 +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>Sorting images based on their Pixel Dimension. (ver 0.5)</title>
		<link>http://www.rxt7.com/log/?p=32</link>
		<comments>http://www.rxt7.com/log/?p=32#comments</comments>
		<pubDate>Sun, 16 Sep 2007 13:30:05 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>

		<guid isPermaLink="false">http://www.rxt7.com/log/?p=32</guid>
		<description><![CDATA[I have a lot of images and almost all of them are saved based on JPEG standard. I have tried different software to sort them based on size but none that I know can do it based on image's pixel dimension(1). JPEG compresses an image based on the color information present in the image (2). [...]]]></description>
			<content:encoded><![CDATA[<p>I have a lot of images and almost all of them are saved based on JPEG standard. I have tried different software to sort them based on size but none that I know can do it based on image's pixel dimension(1). JPEG compresses an image based on the color information present in the image (2). Thus, the file sizes are not a true representation of how large an image is when displayed on screen. In trying to sort out small images based on their width or height we face the challenge of sorting images which are unusually tall or wide. Hence, sorting images based on their pixel dimension is a more accurate way of sorting images into groups. I present a script in PHP that does exactly that. The code is fast enough although you need to increase the execution time in php.ini. This script is to be used as a shell script and not in a website. Here are the results I got:<br />
Total of 1019 out of 10000 were small.<br />
Total of 2407 out of 10000 were medium.<br />
Total of 6574 out of 10000 were large.<br />
406.990354061 seconds  to sort images</p>
<p>So that is roughly 0.04 seconds for each image.</p>
<p><em>Listings: <a href="http://www.hotscripts.com/Detailed/73680.html">HotScript Listed!</a></em><br />
<em><a href="http://px.sklar.com/code.html/id=1296">px.sklar.com Listed!</a><br />
</em></p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showCodeTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/*</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">small :</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">150 x 150 or smaller</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">medium :</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">larger than 150 x 150 and</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">smaller than 500 x 500</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">large :</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">500 x 500 or larger</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> pixel_dim_sort<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$src_dir</span>, <span style="color:#0000FF;">$dest_dir</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dir</span> = <span style="color:#0000FF;">$src_dir</span>; <span style="color:#FF9933; font-style:italic;">// directory where the unsorted images are</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// $dest_dir&nbsp; directory where sorted images will be stored</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// in three folders small, mediam and large</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/file_exists"><span style="color:#000066;">file_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Source directory $dir does not exist! &lt;br/&gt;<span style="color:#000099; font-weight:bold;">\n</span>&nbsp; &nbsp;"</span>; <a href="http://www.php.net/exit"><span style="color:#000066;">exit</span></a>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/file_exists"><span style="color:#000066;">file_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dest_dir</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/mkdir"><span style="color:#000066;">mkdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dest_dir</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// create the sorted images directory if it does not exist</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dir_small</span> = <span style="color:#0000FF;">$dest_dir</span>&nbsp; . <span style="color:#FF0000;">"small/"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dir_medium</span> = <span style="color:#0000FF;">$dest_dir</span>&nbsp; . <span style="color:#FF0000;">"medium/"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$dir_large</span> = <span style="color:#0000FF;">$dest_dir</span>&nbsp; . <span style="color:#FF0000;">"large/"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$pixel_dim_small</span> = <span style="color:#CC66CC;color:#800000;">22500</span>; <span style="color:#FF9933; font-style:italic;">// x &lt;= 150*150</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$pixel_dim_medium</span> = <span style="color:#CC66CC;color:#800000;">250000</span> ; <span style="color:#FF9933; font-style:italic;">//500*500&lt;= x &lt;150*150</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$pixel_dim_large</span> = <span style="color:#CC66CC;color:#800000;">250000</span>; <span style="color:#FF9933; font-style:italic;">// x&gt; 500*500</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/file_exists"><span style="color:#000066;">file_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_small</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/mkdir"><span style="color:#000066;">mkdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_small</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/file_exists"><span style="color:#000066;">file_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_medium</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/mkdir"><span style="color:#000066;">mkdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_medium</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/file_exists"><span style="color:#000066;">file_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_large</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/mkdir"><span style="color:#000066;">mkdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir_large</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$total_count</span> =<span style="color:#CC66CC;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$total_small</span> = <span style="color:#CC66CC;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$total_medium</span> = <span style="color:#CC66CC;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$total_large</span> = <span style="color:#CC66CC;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Open a known directory, and proceed to read its contents</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/is_dir"><span style="color:#000066;">is_dir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dh</span> = <a href="http://www.php.net/opendir"><span style="color:#000066;">opendir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">while</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$file</span> = <a href="http://www.php.net/readdir"><span style="color:#000066;">readdir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dh</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> !== <span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$file</span> != <span style="color:#FF0000;">'.'</span> &amp;&amp; <span style="color:#0000FF;">$file</span> != <span style="color:#FF0000;">'..'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$imagehw</span> = <a href="http://www.php.net/getimagesize"><span style="color:#000066;">GetImageSize</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>. <span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$total_count</span>++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$imgdim</span>= <span style="color:#0000FF;">$imagehw</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>*<span style="color:#0000FF;">$imagehw</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$imgdim</span> &lt;= <span style="color:#0000FF;">$pixel_dim_small</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$bool</span> = <a href="http://www.php.net/copy"><span style="color:#000066;">copy</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>. <span style="color:#0000FF;">$file</span>, <span style="color:#0000FF;">$dir_small</span> . <span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$bool</span> <span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; <span style="color:#FF9933; font-style:italic;">// making sure we don't delete the file which is not copied</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/unlink"><span style="color:#000066;">unlink</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>.<span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"copy file failed ... "</span>; <a href="http://www.php.net/exit"><span style="color:#000066;">exit</span></a>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$total_small</span>++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">elseif</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$imgdim</span>&gt; <span style="color:#0000FF;">$pixel_dim_small</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp;&amp; <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$imgdim</span>&nbsp; &lt;= <span style="color:#0000FF;">$pixel_dim_medium</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$bool</span> = <a href="http://www.php.net/copy"><span style="color:#000066;">copy</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>. <span style="color:#0000FF;">$file</span>, <span style="color:#0000FF;">$dir_medium</span> . <span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$bool</span> <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/unlink"><span style="color:#000066;">unlink</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>.<span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"copy file failed ... "</span>; <a href="http://www.php.net/exit"><span style="color:#000066;">exit</span></a>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$total_medium</span>++;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">elseif</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$imgdim</span> &gt; <span style="color:#0000FF;">$pixel_dim_large</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$bool</span> = <a href="http://www.php.net/copy"><span style="color:#000066;">copy</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>. <span style="color:#0000FF;">$file</span>, <span style="color:#0000FF;">$dir_large</span> . <span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$bool</span> <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/unlink"><span style="color:#000066;">unlink</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dir</span>.<span style="color:#0000FF;">$file</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"copy file failed ... "</span>; <a href="http://www.php.net/exit"><span style="color:#000066;">exit</span></a>; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$total_large</span>++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/closedir"><span style="color:#000066;">closedir</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$dh</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$total_count</span> = <span style="color:#0000FF;">$total_small</span> + <span style="color:#0000FF;">$total_medium</span> + <span style="color:#0000FF;">$total_large</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Total of $total_small out of $total_count were small. &lt;br /&gt;<span style="color:#000099; font-weight:bold;">\n</span> "</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Total of $total_medium out of $total_count were medium. &lt;br /&gt;<span style="color:#000099; font-weight:bold;">\n</span> "</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Total of $total_large out of $total_count were large. &lt;br /&gt;<span style="color:#000099; font-weight:bold;">\n</span> "</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$start</span> = <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> + <a href="http://www.php.net/microtime"><span style="color:#000066;">microtime</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">pixel_dim_sort<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"f:/0000/new/"</span>, <span style="color:#FF0000;">"f:/0000/sorted2/"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> + <a href="http://www.php.net/microtime"><span style="color:#000066;">microtime</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> - <span style="color:#0000FF;">$start</span>, <span style="color:#FF0000;">' seconds to sort images.'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=32&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_32" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An AFP photo with problems!</title>
		<link>http://www.rxt7.com/log/?p=34</link>
		<comments>http://www.rxt7.com/log/?p=34#comments</comments>
		<pubDate>Thu, 16 Aug 2007 10:17:29 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.rxt7.com/log/?p=34</guid>
		<description><![CDATA[More update: I am not the only one noticing the picture ... Trailrank
Update: Looks like Yahoo has pulled the photo off....
I came across a photo by AFP on yahoo news that seemed not true.

A bullet is the projectile that kills or destroys and it is the top section of a cartridge. As you can see [...]]]></description>
			<content:encoded><![CDATA[<p>More update: I am not the only one noticing the picture ... <a href="http://tailrank.com/2424363/Terrorist-Propaganda-Picture-of-the-Week">Trailrank</a><br />
Update: Looks like Yahoo has pulled the photo off....</p>
<p>I came across a photo by AFP on yahoo news that seemed not true.</p>
<p><img src='http://www.rxt7.com/log/wp-content/uploads/2007/08/yahoo-news-photo_1187254597562.png' alt='Yahoo news photo' /></p>
<p>A bullet is the projectile that kills or destroys and it is the top section of a cartridge. As you can see in the photo the two cartridges are intact and brand new. They are not fired at all. I had to post this because errors like this might undermine the horrible truth about human suffering in war zones.</p>
<p>Original photo link: <a href="http://news.yahoo.com/photo/070814/photos_ts_wl_afp/5d5628cebbd37f6d6048f372029ff9c7">http://news.yahoo.com</a><br />
Reference on bullets: <a href="http://en.wikipedia.org/wiki/Bullet">http://en.wikipedia.org/wiki/Bullet</a></p>
<p>Disclaimer:<br />
Everything not me "rxt7.com" belongs to their owners including and not limited to their names, logos, graphics, and text.</p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=34&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_34" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Tripod Panorama Head</title>
		<link>http://www.rxt7.com/log/?p=31</link>
		<comments>http://www.rxt7.com/log/?p=31#comments</comments>
		<pubDate>Sat, 30 Jun 2007 12:59:22 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[DIYs]]></category>

		<guid isPermaLink="false">http://www.rxt7.com/log/?p=31</guid>
		<description><![CDATA[Panoramas are great for for a variety of photographic scenes specially landscapes, but I also like the creative/artistic possibilities it offers as well. So I decided to buy a panoramic tripod, and after much research I found them to be very expensive, considering what they are. I searched for DIY panorama heads and I found [...]]]></description>
			<content:encoded><![CDATA[<p>Panoramas are great for for a variety of photographic scenes specially landscapes, but I also like the creative/artistic possibilities it offers as well. So I decided to buy a panoramic tripod, and after much research I found them to be very expensive, considering what they are. I searched for DIY panorama heads and I found three descriptions to be the most inspiring. However, I was going to mound a Nikon D200 which is heavy and I am not very good with wood, so I made one with soft steel! I basically took a strip of steel 21mm wide and 480 mm long and twisted and turned it to get the basic shape. </p>
<p><img src="http://rxt7.com/log/pano/pano1.jpg" alt="Panorama Head back" /></p>
<p>Then added a welded a piece 270 mm long to make the railing where the camera will mount and be adjusted for the rotation around entrance pupil. Later finished with adding the mounting bracket and nut.</p>
<p>After much grinding and cleaning here it is! ( I know there is a D100 on it now!)</p>
<p><img src="http://rxt7.com/log/pano/pano2.jpg" alt="Panorama head finished" /></p>
<p>Here is a test picture. The only problem is with lighting and exposure adjustment!</p>
<p>22 images<br />
Size: 23841 x 3220<br />
FOV: 360.00° x 45.98°<br />
Lens: Standard<br />
Projection: Cylindrical</p>
<p><img src="http://rxt7.com/log/pano/pano3.jpg" alt="Panorama test picture" /></p>
<p>Ref:</p>
<p><a href="http://www.worth1000.com/tutorial.asp?sid=161123">Worth 1000</a><br />
<a href="http://www.sentex.net/~mwandel/photo/panos.html/">Wandel</a><br />
<a href="http://www.stockholmviews.com/diyphotogear/pano_head.html/">Stockhomviews</a></p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=31&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_31" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=31</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick and dirty SETI@home stats</title>
		<link>http://www.rxt7.com/log/?p=27</link>
		<comments>http://www.rxt7.com/log/?p=27#comments</comments>
		<pubDate>Mon, 15 Jan 2007 10:01:06 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>

		<guid isPermaLink="false">http://www.rxt7.com/log/?p=27</guid>
		<description><![CDATA[I have used the WAP interface for getting the stats, which are placed in an array and you can choose what to display on your own home page.  All you need is to change the id number in the URL and you are set to go!

&#60;?php
$stat&#160;=&#160;file_get_contents("http://setiathome.berkeley.edu/userw.php?id=59935")&#160;;
$stat&#160;=&#160;str_replace("&#60;br/&#62;",&#160;"&#124;",&#160;$stat);
$stat&#160;=&#160;strip_tags($stat);
$stats&#160;=&#160;explode("&#124;",&#160;$stat);
/*
[0]&#160;=&#62;&#160;SETI@home&#160;
[1]&#160;=&#62;&#160;Account&#160;Data&#160;&#160;[2]&#160;=&#62;&#160;for&#160;Tabibazar&#160;
[3]&#160;=&#62;&#160;Time:&#160;15&#160;Jan&#160;2007&#160;01:54:12&#160;UTC&#160;
[4]&#160;=&#62;&#160;User&#160;TotCred:&#160;4,945.62&#160;
[5]&#160;=&#62;&#160;User&#160;AvgCred:&#160;0.16&#160;
[7]&#160;=&#62;&#160;Team:&#160;Spread&#160;Firefox&#160;
[8]&#160;=&#62;&#160;Team&#160;TotCred:&#160;7,841,248.97&#160;
[9]&#160;=&#62;&#160;Team&#160;AvgCred:&#160;8,265.01
*/
echo&#160;$stats[4];
?&#62;


Share This
]]></description>
			<content:encoded><![CDATA[<p>I have used the WAP interface for getting the stats, which are placed in an array and you can choose what to display on your own home page.  All you need is to change the id number in the URL and you are set to go!</p>
<p><code><span style="color: #000000"><br />
</span><span style="color: #0000BB">&lt;?php<br />
$stat&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">"http://setiathome.berkeley.edu/userw.php?id=59935"</span><span style="color: #007700">)&nbsp;;<br />
</span><span style="color: #0000BB">$stat&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">"&lt;br/&gt;"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"|"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$stat</span><span style="color: #007700">);<br />
</span><span style="color: #0000BB">$stat&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strip_tags</span><span style="color: #007700">(</span><span style="color: #0000BB">$stat</span><span style="color: #007700">);<br />
</span><span style="color: #0000BB">$stats&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"|"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$stat</span><span style="color: #007700">);<br />
</span><span style="color: #FF8000">/*<br />
[0]&nbsp;=&gt;&nbsp;SETI@home&nbsp;<br />
[1]&nbsp;=&gt;&nbsp;Account&nbsp;Data&nbsp;&nbsp;[2]&nbsp;=&gt;&nbsp;for&nbsp;Tabibazar&nbsp;<br />
[3]&nbsp;=&gt;&nbsp;Time:&nbsp;15&nbsp;Jan&nbsp;2007&nbsp;01:54:12&nbsp;UTC&nbsp;<br />
[4]&nbsp;=&gt;&nbsp;User&nbsp;TotCred:&nbsp;4,945.62&nbsp;<br />
[5]&nbsp;=&gt;&nbsp;User&nbsp;AvgCred:&nbsp;0.16&nbsp;<br />
[7]&nbsp;=&gt;&nbsp;Team:&nbsp;Spread&nbsp;Firefox&nbsp;<br />
[8]&nbsp;=&gt;&nbsp;Team&nbsp;TotCred:&nbsp;7,841,248.97&nbsp;<br />
[9]&nbsp;=&gt;&nbsp;Team&nbsp;AvgCred:&nbsp;8,265.01<br />
*/<br />
</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">$stats</span><span style="color: #007700">[</span><span style="color: #0000BB">4</span><span style="color: #007700">];<br />
</span><span style="color: #0000BB">?&gt;<br />
</span><br />
</code></p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=27&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_27" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And so there it goes!</title>
		<link>http://www.rxt7.com/log/?p=24</link>
		<comments>http://www.rxt7.com/log/?p=24#comments</comments>
		<pubDate>Wed, 10 Jan 2007 03:24:21 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.pixelcutter.com/log/?p=24</guid>
		<description><![CDATA[It is 2007!  Supposedly everyone  "enters" the new year with a resolution to make themselves better or to do something. When I was growing up, I would always separate some time to myself and think about the last year and what had happened and how it was. I stopped doing that about ten [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I</strong>t is 2007!  Supposedly everyone  "enters" the new year with a resolution to make themselves better or to do something. When I was growing up, I would always separate some time to myself and think about the last year and what had happened and how it was. I stopped doing that about ten years ago. I never figured out why it was but I went from a semi-existentialist person to a fatalist. May be with age, nature had taught me not to be overly confident with my abilities. Being bombarded with many nice events in my life like getting married. I have also been showered with endless personal pain and difficulties. Most people would start thinking along the lines of destiny and so on and so forth. But, that is not good enough! I have come to think that we usually think about the world as a duality. What I mean we perceive the world as something against the other. For example, light versus dark, good versus evil and so on. What if there is no polarity to the world, then it will be very comforting in my view. This may be nothing new but imagine if behavior or life is a histogram, vertical axis being events or actions and the horizontal axis being absolute good to the left and absolute bad to the right . When someone does something bad. I would not think that he is an (absolute) bad person. I would think that his histogram of behavior has more points towards right! And vice versa I am trying to have more points on the left. And so there it goes, I just made life and inverted luminosity histogram of a photograph. All we can hope to do is to be a well exposed photograph. When talking of histograms one has to also take into account that there is a time frame of sort. So if one claims the the world is cruel to him you could ask how long has it been and how often has he sampled the actions of the world.<br />
More to come in the future!</p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=24&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_24" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Value of Privacy</title>
		<link>http://www.rxt7.com/log/?p=16</link>
		<comments>http://www.rxt7.com/log/?p=16#comments</comments>
		<pubDate>Thu, 15 Jun 2006 09:33:14 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.pixelcutter.com/log/?p=16</guid>
		<description><![CDATA[June 15, 2006
by Bruce Schneier
http://www.schneier.com
http://www.counterpane.com
Last month, revelation of yet another NSA surveillance effort against
the American people rekindled the privacy debate.  Those in favor of
these programs have trotted out the same rhetorical question we hear
every time privacy advocates oppose ID checks, video cameras, massive
databases, data mining, and other wholesale surveillance measures: "If
you aren't doing anything [...]]]></description>
			<content:encoded><![CDATA[<p>June 15, 2006<br />
<strong>by Bruce Schneier</strong><br />
<a href="http://www.schneier.com">http://www.schneier.com</a><br />
<a href="http://www.counterpane.com">http://www.counterpane.com</a></p>
<p>Last month, revelation of yet another NSA surveillance effort against<br />
the American people rekindled the privacy debate.  Those in favor of<br />
these programs have trotted out the same rhetorical question we hear<br />
every time privacy advocates oppose ID checks, video cameras, massive<br />
databases, data mining, and other wholesale surveillance measures: "If<br />
you aren't doing anything wrong, what do you have to hide?"</p>
<p>Some clever answers: "If I'm not doing anything wrong, then you have no<br />
cause to watch me." "Because the government gets to define what's<br />
wrong, and they keep changing the definition." "Because you might do<br />
something wrong with my information." My problem with quips like these<br />
-- as right as they are -- is that they accept the premise that privacy<br />
is about hiding a wrong. It's not. Privacy is an inherent human right,<br />
and a requirement for maintaining the human condition with dignity and<br />
respect.</p>
<p>Two proverbs say it best: "Quis custodiet ipsos custodes?" ("Who<br />
watches the watchers?") and "Absolute power corrupts absolutely."</p>
<p>Cardinal Richelieu understood the value of surveillance when he<br />
famously said, "If one would give me six lines written by the hand of<br />
the most honest man, I would find something in them to have him<br />
hanged." Watch someone long enough, and you'll find something to arrest<br />
-- or just blackmail -- him with. Privacy is important because without<br />
it, surveillance information will be abused: to peep, to sell to<br />
marketers, and to spy on political enemies -- whoever they happen to be<br />
at the time.</p>
<p>Privacy protects us from abuses by those in power, even if we're doing<br />
nothing wrong at the time of surveillance.</p>
<p>We do nothing wrong when we make love or go to the bathroom. We are not<br />
deliberately hiding anything when we seek out private places for<br />
reflection or conversation. We keep private journals, sing in the<br />
privacy of the shower, and write letters to secret lovers and then burn<br />
them. Privacy is a basic human need.</p>
<p>A future in which privacy would face constant assault was so alien to<br />
the framers of the Constitution that it never occurred to them to call<br />
out privacy as an explicit right. Privacy was inherent to the nobility<br />
of their being and their cause. Of course being watched in your own<br />
home was unreasonable. Watching at all was an act so unseemly as to be<br />
inconceivable among gentlemen in their day. You watched convicted<br />
criminals, not free citizens. You ruled your own home. It's intrinsic<br />
to the concept of liberty.</p>
<p>For if we are observed in all matters, we are constantly under threat<br />
of correction, judgment, criticism, even plagiarism of our own<br />
uniqueness. We become children, fettered under watchful eyes,<br />
constantly fearful that -- either now or in the uncertain future --<br />
patterns we leave behind will be brought back to implicate us, by<br />
whatever authority has now become focused upon our once-private and<br />
innocent acts. We lose our individuality, because everything we do is<br />
observable and recordable.</p>
<p>How many of us have paused during conversations in the past<br />
four-and-a-half years, suddenly aware that we might be eavesdropped on?<br />
Probably it was a phone conversation, although maybe it was an e-mail<br />
or instant message exchange or a conversation in a public place. Maybe<br />
the topic was terrorism, or politics, or Islam. We stop suddenly,<br />
momentarily afraid that our words might be taken out of context, then<br />
we laugh at our paranoia and go on. But our demeanor has changed, and<br />
our words are subtly altered.</p>
<p>This is the loss of freedom we face when our privacy is taken from us.<br />
This was life in the former East Germany, or life in Saddam Hussein's<br />
Iraq. And it's our future as we allow an ever-intrusive eye into our<br />
personal, private lives.</p>
<p>Too many wrongly characterize the debate as "security versus privacy."<br />
The real choice is liberty versus control. Tyranny, whether it arises<br />
under threat of foreign physical attack or under constant domestic<br />
authoritative scrutiny, is still tyranny. Liberty requires security<br />
without intrusion, security plus privacy. Widespread police<br />
surveillance is the very definition of a police state. And that's why<br />
we should champion privacy even when we have nothing to hide.</p>
<p>A version of this essay originally appeared on Wired.com.<br />
<a href="http://www.wired.com/news/columns/0,70886-0.html">http://www.wired.com</a></p>
<p>Daniel Solove comments:<br />
<a href="http://www.concurringopinions.com/archives/2006/05/is_there_a_good.html ">http://www.concurringopinions.com</a></p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=16&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_16" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox download counter using XSLT and php</title>
		<link>http://www.rxt7.com/log/?p=15</link>
		<comments>http://www.rxt7.com/log/?p=15#comments</comments>
		<pubDate>Wed, 17 May 2006 10:45:37 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[PHP Scripts]]></category>

		<guid isPermaLink="false">http://www.pixelcutter.com/log/?p=15</guid>
		<description><![CDATA[Firefox downloads from its RSS feed using XSLT with php 4.4.x and 5.x]]></description>
			<content:encoded><![CDATA[<p>Here is a quick script to get the total Firefox downloads from its RSS feed using XSLT with php 4.4.x and 5.x:</p>
<p><a href="http://www.rxt7.com/xslt/test4.php4">PHP 4 test script</a><br />
<a href="http://www.rxt7.com/xslt/test4.php5">PHP 5 test script</a></p>
<p><code><a href="javascript:popitup('../files/xslt/test4.phps' , 400, 800);"><br />
PHP source code<br />
</a></code></p>
<p><code><a href="javascript:popitup('../files/xslt/test.txt' , 400, 800);"><br />
XSLT source code<br />
</a></code></p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=15&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_15" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange routing of DHL packages</title>
		<link>http://www.rxt7.com/log/?p=10</link>
		<comments>http://www.rxt7.com/log/?p=10#comments</comments>
		<pubDate>Sat, 15 Apr 2006 12:44:54 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pixelcutter.com/log/?p=10</guid>
		<description><![CDATA[This two page letter has crossed the Atlantic 3 times!<br /><br />]]></description>
			<content:encoded><![CDATA[<p>This two page letter has crossed the Atlantic 3 times!</p>
<table border="0" cellpadding="0" cellspacing="0" width="574">
<tbody>
<tr>
<td colspan="7">&nbsp;</p>
</td>
</tr>
<tr>
<td colspan="7" class="hdlnType2">
</td>
</tr>
<tr>
				<strong>
<td width="100"><strong>Date</strong></td>
<td width="14">&nbsp;</td>
<td width="40"><strong>Time</strong></td>
<td width="14">&nbsp;</td>
<td width="150"><strong>Location Service Area</strong></td>
<td width="14">&nbsp;</td>
<td width="242"><strong>Checkpoint Details</strong></td>
<p></strong><br />
			</tr>
<tr>
<td colspan="7">
<hr noshade="noshade" size="1"/></td>
</tr>
<tr>
<td width="100">April 07, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">01:37</td>
<td width="14">&nbsp;</td>
<td width="150">Express Logistics Centre, Dubai - United Arab Emirates</td>
<td width="14">&nbsp;</td>
<td width="242">Arrived at DHL facility in Express Logistics Centre, Dubai - United Arab Emirates</p>
</td>
</tr>
<tr>
<td width="100">April 07, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">12:11</td>
<td width="14">&nbsp;</td>
<td width="150">Express Logistics Centre, Dubai - United Arab Emirates</td>
<td width="14">&nbsp;</td>
<td width="242">Departed from DHL facility in Express Logistics Centre, Dubai - United Arab Emirates</p>
</td>
</tr>
<tr>
<td width="100">April 07, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">20:58</td>
<td width="14">&nbsp;</td>
<td width="150">Cologne - Germany</td>
<td width="14">&nbsp;</td>
<td width="242">Arrived at DHL facility in Cologne - Germany</p>
</td>
</tr>
<tr>
<td width="100">April 08, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">02:18</td>
<td width="14">&nbsp;</td>
<td width="150">Cologne - Germany</td>
<td width="14">&nbsp;</td>
<td width="242">Departed from DHL facility in Cologne - Germany</p>
</td>
</tr>
<tr>
<td width="100">April 08, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">04:11</td>
<td width="14">&nbsp;</td>
<td width="150">East Midlands - UK</td>
<td width="14">&nbsp;</td>
<td width="242">Departed from DHL facility in East Midlands - UK</p>
</td>
</tr>
<tr>
<td width="100">April 08, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">06:38</td>
<td width="14">&nbsp;</td>
<td width="150">New York City Gateway, NY - USA</td>
<td width="14">&nbsp;</td>
<td width="242">Arrived at DHL facility in New York City Gateway - USA</p>
</td>
</tr>
<tr>
<td width="100">April 09, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">18:16</td>
<td width="14">&nbsp;</td>
<td width="150">Brussels - Belgium</td>
<td width="14">&nbsp;</td>
<td width="242">Departed from DHL facility in Brussels - Belgium</p>
</td>
</tr>
<tr>
<td width="100">April 10, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">02:53</td>
<td width="14">&nbsp;</td>
<td width="150">London-Heathrow - UK</td>
<td width="14">&nbsp;</td>
<td width="242">Arrived at DHL facility in London-Heathrow - UK</p>
</td>
</tr>
<tr>
<td width="100">April 10, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">10:31</td>
<td width="14">&nbsp;</td>
<td width="150">London-Heathrow - UK</td>
<td width="14">&nbsp;</td>
<td width="242">Departed from DHL facility in London-Heathrow - UK</p>
</td>
</tr>
<tr>
<td width="100">April 10, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">23:31</td>
<td width="14">&nbsp;</td>
<td width="150">Toronto - Canada</td>
<td width="14">&nbsp;</td>
<td width="242">Departed from DHL facility in Toronto - Canada</p>
</td>
</tr>
<tr>
<td width="100">April 11, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">07:34</td>
<td width="14">&nbsp;</td>
<td width="150">Markham - Canada</td>
<td width="14">&nbsp;</td>
<td width="242">Arrived at DHL Facility</p>
</td>
</tr>
<tr>
<td width="100">April 11, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">09:54</td>
<td width="14">&nbsp;</td>
<td width="150">Markham - Canada</td>
<td width="14">&nbsp;</td>
<td width="242">With delivery courier</p>
</td>
</tr>
<tr>
<td width="100">April 11, 2006</td>
<td width="14">&nbsp;</td>
<td width="40">13:25</td>
<td width="14">&nbsp;</td>
<td width="150">Markham - Canada</td>
<td width="14">&nbsp;</td>
<td width="242">Shipment delivered</p>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="574">
<tbody>
<tr>
<td>
</td>
</tr>
</tbody>
</table>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=10&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_10" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I wonder why?</title>
		<link>http://www.rxt7.com/log/?p=9</link>
		<comments>http://www.rxt7.com/log/?p=9#comments</comments>
		<pubDate>Wed, 15 Mar 2006 03:16:25 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.pixelcutter.com/log/?p=9</guid>
		<description><![CDATA[I talked about my problems with uTorrent and choose BitComet as a torrent client. I wonder why BitComet needs to send an email?

Share This
]]></description>
			<content:encoded><![CDATA[<p>I talked about my problems with uTorrent and choose BitComet as a torrent client. I wonder why BitComet needs to send an email?</p>
<p><img src='http://www.pixelcutter.com/uploads/Capture.jpg' alt='Bitcomet Sending Email!' /></p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=9&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_9" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word Play and Life</title>
		<link>http://www.rxt7.com/log/?p=8</link>
		<comments>http://www.rxt7.com/log/?p=8#comments</comments>
		<pubDate>Wed, 08 Mar 2006 17:37:56 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.pixelcutter.com/log/?p=8</guid>
		<description><![CDATA[Here is a nice site to consider if you are confused with words like "freedom" and "civil libirties"
anxietyculture.com
Cheers,
Share This
]]></description>
			<content:encoded><![CDATA[<p>Here is a nice site to consider if you are confused with words like "freedom" and "civil libirties"<br />
<a href="http://www.anxietyculture.com">anxietyculture.com</a><br />
Cheers,</p>
<p class="akst_link"><a href="http://www.rxt7.com/log/?p=8&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_8" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.rxt7.com/log/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
