<?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>v-nessa.net</title>
	<atom:link href="http://www.v-nessa.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.v-nessa.net</link>
	<description>pink is the new black</description>
	<lastBuildDate>Fri, 06 Aug 2010 02:06:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Review of ReclaiMe Data Recovery Software</title>
		<link>http://www.v-nessa.net/2010/08/05/review-of-reclaime-data-recovery-software</link>
		<comments>http://www.v-nessa.net/2010/08/05/review-of-reclaime-data-recovery-software#comments</comments>
		<pubDate>Fri, 06 Aug 2010 02:06:55 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=374</guid>
		<description><![CDATA[We all know how much it sucks to have a hard drive fail &#8211; months or even years worth of data down the drain. And I bet you don&#8217;t do regular backups, do you? I came across ReclaiME from a review site. It&#8217;s software (that unfortunately only works on Windows) that you can install on [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F08%2F05%2Freview-of-reclaime-data-recovery-software"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F08%2F05%2Freview-of-reclaime-data-recovery-software&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>We all know how much it sucks to have a hard drive fail &#8211; months or even years worth of data down the drain. And I bet you don&#8217;t do regular backups, do you?</p>
<p>I came across <a href="http://www.reclaime.com/" target="_blank">ReclaiME</a> from a review site. It&#8217;s software (that unfortunately only works on Windows) that you can install on your computer to reliably recover data from hard drives or memory cards.  More specifically, it lets you:</p>
<ul>
<li>Recover images from a memory card</li>
<li>Recover data from flash/USB drives</li>
<li>Recover data from laptop, external, and SCSI/IDE drives</li>
<li>Unformat non-system drives and partitions</li>
</ul>
<p>I actually ReclaiME on one of my sister&#8217;s old camera memory cards, and it definitely doesn&#8217;t fall short of its claims.   It recovered over 40 images from the almost-empty card, most of which were intact, though a few were corrupted from the camera overwriting them.</p>
<p>While the software is excellent and works just like it promises, the only downside is that the price is a bit steep for the average user.  I&#8217;d imagine that software like this would be more tangible for service providers, businesses, or people that consider their data valuable enough to justify spending a pretty penny on <a href="http://www.reclaime.com/" target="_blank">data recovery</a> software.  The price isn&#8217;t outrageous or anything, it&#8217;s just more than I&#8217;d pay for Windows-based recovery software (I prefer to use Linux), when there are other free/open-source alternatives out there:</p>
<p><a href="http://lifehacker.com/5237503/five-best-free-data-recovery-tools" target="_blank">http://lifehacker.com/5237503/five-best-free-data-recovery-tools</a></p>
<p><map name='google_ad_map_374_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/374?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_374_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=374&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F08%2F05%2Freview-of-reclaime-data-recovery-software' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=374&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/08/05/review-of-reclaime-data-recovery-software/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using PHP to Extract Image Exif Data</title>
		<link>http://www.v-nessa.net/2010/08/02/using-php-to-extract-image-exif-data</link>
		<comments>http://www.v-nessa.net/2010/08/02/using-php-to-extract-image-exif-data#comments</comments>
		<pubDate>Mon, 02 Aug 2010 12:24:03 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=370</guid>
		<description><![CDATA[Those of us fluent in digital photography have come across the term &#8220;Exif data&#8221; numerous times when it comes to software we use to digitally manipulate photographs. Exif (Exchangeable image file format) data is generally used to identify the properties of the camera that snapped a picture, and usually the software that altered it afterwards. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F08%2F02%2Fusing-php-to-extract-image-exif-data"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F08%2F02%2Fusing-php-to-extract-image-exif-data&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Those of us fluent in digital photography have come across the term &#8220;Exif data&#8221; numerous times when it comes to software we use to digitally manipulate photographs. Exif (Exchangeable image file format) data is generally used to identify the properties of the camera that snapped a picture, and usually the software that altered it afterwards. It can tell you when a picture was taken, what kind of camera took it, as well as the camera&#8217;s model, shutter speed, focal length, and even provide a thumbnail of the image on the camera&#8217;s LCD screen.</p>
<p>Why would you need to extract this information?  If you&#8217;re ever uploaded images to stock photography sites and wonder how they know so much about your pictures, it&#8217;s because they extract the Exif data from your pictures to provide more information on how they were taken. This quick tutorial will demonstrate how to extract Exif data from an image using PHP.</p>
<h2>Enabling the Exif Extension</h2>
<p>The Exif functions for PHP may not be native to your installation, so you can check by viewing your phpinfo file or running &#8220;php -m&#8221; via command line to see a list of modules compiled in. If you don&#8217;t see Exif listed, there are three ways you can enable it depending on how you installed PHP:</p>
<ul>
<li>If you compiled PHP manually, you can re-compile while adding &#8211;enable-exif to the configure line</li>
<li>If PHP is installed via package (rpm/deb), it should already have Exif enabled. If not, you can <a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=exif.so" target="_blank">install an RPM</a> for the extension manually</li>
<li>If you use cPanel, run EasyApache and select the Exif extension from the PHP module list, and recompile</li>
</ul>
<h2>Determining the Image Type</h2>
<p>The <a href="http://www.php.net/manual/en/function.exif-imagetype.php" target="_blank">exif_imagetype</a> function identifies the format of an image, but returns the result as a code.  The <a href="http://www.php.net/manual/en/function.exif-imagetype.php" target="_blank">PHP function reference</a> provides a full list of these return codes, but 1-8 are the most common out of the 16:</p>
<blockquote><p>1: GIF<br />
2: JPEG<br />
3: PNG<br />
4: SWF<br />
5: PSD<br />
6: BMP<br />
7/8: TIFF</p></blockquote>
<p>Here&#8217;s a code example that lists all the desired valid image types in an array and detects the type of image from the specified file, returning the result in &#8220;human readable&#8221; format:</p>
<p><code>&lt;?php<br />
$image = "/path/to/myimage";</code></p>
<p><code>$types = array(<br />
1 =&gt; "GIF",<br />
2 =&gt; "JPEG",<br />
3 =&gt; "PNG",<br />
4 =&gt; "SWF",<br />
5 =&gt; "PSD",<br />
6 =&gt; "BMP",<br />
7 =&gt; "TIFF",<br />
8 =&gt; "TIFF"<br />
);</code></p>
<p><code>$imagetype = exif_imagetype($image);</code></p>
<p><code>if (array_key_exists($imagetype, $types)) {<br />
echo "Image type is: " . $types[$imagetype];<br />
} else {<br />
echo "Not a valid image type";<br />
}<br />
?&gt;</code></p>
<h2>Reading Exif Header Data</h2>
<p>The <a href="http://php.net/exif_read_data" target="_blank">exif_read_data</a> function can be used to extract header data from JPEG and TIFF files:<br />
<code><br />
&lt;?php<br />
$image = "/path/to/myimage";<br />
$exif = exif_read_data($image, 0, true);<br />
foreach ($exif as $key =&gt; $section) {<br />
foreach ($section as $name =&gt; $val) {<br />
echo "$key.$name: $val\n";<br />
}<br />
}<br />
?&gt;<br />
</code></p>
<p>This will return the elements of the array from exif_read_data, which can be very long depending on what information is available for the image. There are seven sections (arrays) of data types:</p>
<ul>
<li>FILE:  Contains the file&#8217;s name, size, timestamp, and what other sections were found (as listed below)</li>
<li>COMPUTED: Contains the actual attributes of the image</li>
<li>ANY_TAG:  Any information that is tagged</li>
<li>IFD0:  Mostly contains information about the camera itself, the software used to edit the image, when it was last modified, etc</li>
<li>THUMBNAIL: Information about the embedded thumbnail for the image</li>
<li>COMMENT: Comment headers for JPEG images</li>
<li>EXIF: Contains more information supplementary to what is in IFD0, mostly related to the camera (includes focal length, zoom ratio, etc)</li>
</ul>
<p>Depending on the information available for the image, you&#8217;ll actually see a lot of data in the output. Say, for instance, you want to only output the IFD0 data to see the information of the camera that took the image:</p>
<p><code>&lt;?php<br />
$image = "image.jpg";<br />
$exif = exif_read_data($image, 0, true);</code><br />
<code>foreach ($exif as $key =&gt; $section) {<br />
foreach ($section as $name =&gt; $val) {<br />
if($key == "IFD0"){<br />
echo "$key.$name: $val\n";<br />
}<br />
}<br />
}<br />
?&gt;<br />
</code><br />
This will output:</p>
<pre>IFD0.ImageWidth: 2592
IFD0.ImageLength: 3872
IFD0.BitsPerSample: Array
IFD0.Compression: 1
IFD0.PhotometricInterpretation: 2
IFD0.Make: NIKON CORPORATION
IFD0.Model: NIKON D80
IFD0.Orientation: 1
IFD0.UndefinedTag:0x0000:
IFD0.XResolution: 72/10000
IFD0.YResolution: 72/1
IFD0.PlanarConfiguration: 1
IFD0.ResolutionUnit: 2
IFD0.Software: Adobe Photoshop CS4 Windows
IFD0.DateTime: 2010:02:06 22:24:09
IFD0.Exif_IFD_Pointer: 304</pre>
<p>Or, you can further narrow down the output by specifying specific values in the $exif multi-dimensional array:</p>
<p><code>&lt;?php<br />
$image = "image.jpg";<br />
$exif = exif_read_data($image, 0, true);<br />
echo "Software: " . $exif['IFD0']['Software'] . "\n";<br />
?&gt;</code></p>
<p>This will return:</p>
<pre>Software: Adobe Photoshop CS4 Windows</pre>
<h2>Using Exif to generate a thumbnail</h2>
<p>As touched on previously, many cameras and image manipulation software will include an embedded thumbnail for an image. You can extract this thumbnail using the <a href="http://php.net/exif_thumbnail" target="_blank">exif_thumbnail</a> function:</p>
<p><code>&lt;?php<br />
$image = "image.jpg";<br />
$thumbnail = exif_thumbnail($image, $width, $height, $type);<br />
echo "&lt;img  width='$width' height='$height' src='data:image;base64,".base64_encode($thumbnail)."'&gt;";<br />
?&gt;</code></p>
<p>Keep in mind that the thumbnail generated here is from the Exif data &#8211; there are other ways to create a thumbnails using many of the <a href="http://us.php.net/manual/en/book.image.php" target="_blank">PHP image</a> functions.</p>
<p><map name='google_ad_map_370_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/370?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_370_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=370&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F08%2F02%2Fusing-php-to-extract-image-exif-data' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=370&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/08/02/using-php-to-extract-image-exif-data/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Simple PHP Script for RBL Checking</title>
		<link>http://www.v-nessa.net/2010/07/16/simple-php-script-for-rbl-checking</link>
		<comments>http://www.v-nessa.net/2010/07/16/simple-php-script-for-rbl-checking#comments</comments>
		<pubDate>Fri, 16 Jul 2010 20:43:59 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=368</guid>
		<description><![CDATA[It&#8217;s useful for ISP&#8217;s and email service providers to run occasional RBL checks against their IPs to know when they are being blacklisted by populate CBL services. I&#8217;ve written a simple script that utilizes the DNSBL pear library to check against common blacklists, when given a list of IPs in a file. First, you need [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F07%2F16%2Fsimple-php-script-for-rbl-checking"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F07%2F16%2Fsimple-php-script-for-rbl-checking&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>It&#8217;s useful for ISP&#8217;s and email service providers to run occasional RBL checks against their IPs to know when they are being blacklisted by populate CBL services. I&#8217;ve written a simple script that utilizes the DNSBL pear library to check against common blacklists, when given a list of IPs in a file.</p>
<p>First, you need to download or install the <a href="http://pear.php.net/package/Net_DNSBL" target="_blank">NET_DNSBL</a> pear module. (Command: <strong>pear install NET_DNSBL</strong>)</p>
<p><code>&lt;?php<br />
require_once('Net/DNSBL.php');</code></p>
<p><code>$iplist = file("/path/to/iplist");</code></p>
<p><code>foreach ($iplist as $ip){</code></p>
<p><code>$dnsbl = new Net_DNSBL();</code></p>
<p><code>$dnsbl-&gt;setBlacklists(array(<br />
'sbl-xbl.spamhaus.org',<br />
'dnsbl.sorbs.net',<br />
'bl.spamcop.net',<br />
'dnsbl-1.uceprotect.net',<br />
'dnsbl-2.uceprotect.net',<br />
'dnsbl-3.uceprotect.net',<br />
'isps.spamblocked.com',<br />
'zen.spamhaus.org'<br />
));</code></p>
<p><code>if ($dnsbl-&gt;isListed($ip)) {</code></p>
<p><code>echo "IP $ip is blacklisted!\n";</code></p>
<p><code>}</code></p>
<p><code>else {<br />
echo "IP $ip not listed\n";<br />
}<br />
}</code></p>
<p><code>?&gt;</code></p>
<p>Of course, this script can be very easily modified to pull IPs from a database, or assign the $ip variable from a GET or POST request (like from a form or API).  Here&#8217;s an exclusive list of some RBL&#8217;s you can check against using this script, by adding them to the array shown:</p>
<blockquote><p>asiaspam.spamblocked.com<br />
bl.deadbeef.com<br />
bl.emailbasura.org<br />
bl.spamcop.net<br />
blackholes.five-ten-sg.com<br />
blacklist.woody.ch<br />
bogons.cymru.com<br />
cbl.abuseat.org    cdl.anti-spam.org.cn<br />
combined.abuse.ch<br />
combined.rbl.msrbl.net<br />
db.wpbl.info<br />
dnsbl-1.uceprotect.net<br />
dnsbl-2.uceprotect.net<br />
dnsbl-3.uceprotect.net<br />
dnsbl.abuse.ch<br />
dnsbl.ahbl.org<br />
dnsbl.cyberlogic.net<br />
dnsbl.inps.de<br />
dnsbl.njabl.org<br />
dnsbl.sorbs.net<br />
drone.abuse.ch<br />
duinv.aupads.org<br />
dul.dnsbl.sorbs.net<br />
dul.ru<br />
dyna.spamrats.com<br />
dynip.rothen.com<br />
eurospam.spamblocked.com<br />
fl.chickenboner.biz<br />
http.dnsbl.sorbs.net<br />
images.rbl.msrbl.net<br />
ips.backscatterer.org<br />
isps.spamblocked.com<br />
ix.dnsbl.manitu.net<br />
korea.services.net<br />
lacnic.spamblocked.com<br />
misc.dnsbl.sorbs.net<br />
noptr.spamrats.com<br />
ohps.dnsbl.net.au<br />
omrs.dnsbl.net.au<br />
orvedb.aupads.org<br />
osps.dnsbl.net.au<br />
osrs.dnsbl.net.au<br />
owfs.dnsbl.net.au<br />
owps.dnsbl.net.au<br />
pbl.spamhaus.org<br />
phishing.rbl.msrbl.net<br />
probes.dnsbl.net.au<br />
proxy.bl.gweep.ca<br />
proxy.block.transip.nl<br />
psbl.surriel.com<br />
rbl.interserver.net<br />
rdts.dnsbl.net.au<br />
relays.bl.gweep.ca<br />
relays.bl.kundenserver.de<br />
relays.nether.net<br />
residential.block.transip.nl<br />
ricn.dnsbl.net.au<br />
rmst.dnsbl.net.au<br />
sbl.spamhaus.org<br />
short.rbl.jp<br />
smtp.dnsbl.sorbs.net<br />
socks.dnsbl.sorbs.net<br />
spam.dnsbl.sorbs.net<br />
spam.rbl.msrbl.net<br />
spam.spamrats.com<br />
spamlist.or.kr<br />
spamrbl.imp.ch<br />
t3direct.dnsbl.net.au<br />
tor.ahbl.org<br />
tor.dnsbl.sectoor.de<br />
torserver.tor.dnsbl.sectoor.de<br />
ubl.lashback.com<br />
ubl.unsubscore.com<br />
virbl.bit.nl<br />
virus.rbl.jp<br />
virus.rbl.msrbl.net<br />
web.dnsbl.sorbs.net<br />
wormrbl.imp.ch<br />
xbl.spamhaus.org<br />
zen.spamhaus.org</p></blockquote>
<p><map name='google_ad_map_368_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/368?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_368_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=368&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F07%2F16%2Fsimple-php-script-for-rbl-checking' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=368&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/07/16/simple-php-script-for-rbl-checking/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP to Perform DNS Lookups</title>
		<link>http://www.v-nessa.net/2010/06/30/using-php-to-perform-dns-lookups</link>
		<comments>http://www.v-nessa.net/2010/06/30/using-php-to-perform-dns-lookups#comments</comments>
		<pubDate>Wed, 30 Jun 2010 16:29:44 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=365</guid>
		<description><![CDATA[PHP has a couple DNS functions you can use to perform record lookups. Most of us are familiar with the two basic ones &#8211; gethostbyname() and gethostbyaddr(), both of which perform a single function &#8211; returning a hostname or IP address. Here&#8217;s an example of both: &#60;?php $ip = gethostbyname("v-nessa.net"); $host = gethostbyaddr("69.174.114.71"); echo "v-nessa.net [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F30%2Fusing-php-to-perform-dns-lookups"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F30%2Fusing-php-to-perform-dns-lookups&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>PHP has a couple DNS functions you can use to perform record lookups.</p>
<p>Most of us are familiar with the two basic ones &#8211; <a href="http://us4.php.net/gethostbyname" target="_blank">gethostbyname()</a> and <a href="http://us4.php.net/gethostbyname" target="_blank">gethostbyaddr()</a>, both of which perform a single function &#8211; returning a hostname or IP address. Here&#8217;s an example of both:</p>
<p><code>&lt;?php</code></p>
<p><code>$ip = gethostbyname("v-nessa.net");<br />
$host = gethostbyaddr("69.174.114.71");</code></p>
<p><code>echo "v-nessa.net has the IP $ip, which reverses to $host";</code><br />
<code>?&gt;</code></p>
<p>The above will return:</p>
<blockquote><p>v-nessa.net has the IP 69.174.114.71, which has a PTR of server.v-nessa.net</p></blockquote>
<p>Similarly to gethostbyname, there&#8217;s <a href="http://us2.php.net/manual/en/function.gethostbynamel.php" target="_blank">gethostbynamel</a> which is useful for hostnames with multiple A records:</p>
<p><code>$ips = gethostbynamel("test.v-nessa.net");<br />
foreach ($ips as $ip =&gt; $value){<br />
echo $value . "\n";<br />
}</code></p>
<p>Will return:</p>
<blockquote><p>69.174.114.71<br />
69.174.115.243</p></blockquote>
<p>A more advanced function is <a href="http://us2.php.net/manual/en/function.dns-get-record.php" target="_blank">dns_get_record</a>, which can pull any valid record for a hostname or IP.  Think about the dig command you use in Unix to find DNS records:</p>
<blockquote><p>nessa@nessa-desktop:~$ dig +short v-nessa.net A<br />
69.174.114.71</p></blockquote>
<p>The dns_get_record function works in a similar way, and can obtain the following DNS record types:</p>
<p><strong><tt>DNS_A</tt></strong>, <strong><tt>DNS_CNAME</tt></strong>,        <strong><tt>DNS_HINFO</tt></strong>, <strong><tt>DNS_MX</tt></strong>,        <strong><tt>DNS_NS</tt></strong>, <strong><tt>DNS_PTR</tt></strong>,        <strong><tt>DNS_SOA</tt></strong>, <strong><tt>DNS_TXT</tt></strong>,        <strong><tt>DNS_AAAA</tt></strong>, <strong><tt>DNS_SRV</tt></strong>,        <strong><tt>DNS_NAPTR</tt></strong>, <strong><tt>DNS_A6</tt></strong>,        <strong><tt>DNS_ALL</tt></strong> or <strong><tt>DNS_ANY</tt></strong>.</p>
<p>The following will give you a similar result:</p>
<p><code>$recs = dns_get_record("v-nessa.net", DNS_A);<br />
print_r($recs);</code></p>
<p>Will return:</p>
<blockquote><p>Array<br />
(<br />
[0] =&gt; Array<br />
(<br />
[host] =&gt; v-nessa.net<br />
[type] =&gt; A<br />
[ip] =&gt; 69.174.114.71<br />
[class] =&gt; IN<br />
[ttl] =&gt; 13728<br />
)<br />
)</p></blockquote>
<p>If you want to obtain multiple DNS types, you can do so by separating the record types with a plus sign:</p>
<p><code>$recs = dns_get_record("v-nessa.net", DNS_A + DNS_MX);</code></p>
<p>Will return:</p>
<blockquote><p>Array<br />
(<br />
[0] =&gt; Array<br />
(<br />
[host] =&gt; v-nessa.net<br />
[type] =&gt; A<br />
[ip] =&gt; 69.174.114.71<br />
[class] =&gt; IN<br />
[ttl] =&gt; 13736<br />
)</p>
<p>[1] =&gt; Array<br />
(<br />
[host] =&gt; v-nessa.net<br />
[type] =&gt; MX<br />
[pri] =&gt; 0<br />
[target] =&gt; v-nessa.net<br />
[class] =&gt; IN<br />
[ttl] =&gt; 14145<br />
)</p>
<p>)</p></blockquote>
<p>You&#8217;ll notice that the output is a double array, so to call individual values you can do either of the following:</p>
<p><code>// will return the IP for array 0 ( A record)</code></p>
<p><code>echo $recs[0]['ip'];</code></p>
<p><code>// will return results for common records</code></p>
<p><code>foreach ($recs as $type =&gt; $value){<br />
echo $value[ip] . "\n";<br />
}</code></p>
<p>Similar to the example above, you can use the DNS_ALL type to show any records available for the hostname, and use a minus sign to exclude certain record types. For example, the below code will return all DNS results for v-nessa.net, but exclude NS records:</p>
<p><code>$recs = dns_get_record("v-nessa.net", DNS_ALL - DNS_NS );</code></p>
<p><code>foreach ($recs as $type =&gt; $value){<br />
echo $value[type] . "\n";<br />
}</code></p>
<p>The following records were returned:</p>
<blockquote><p>A<br />
SOA<br />
MX<br />
TXT</p></blockquote>
<p>Here&#8217;s a more practical example &#8211; a simple PHP DNS lookup script. Say you have a form on your site that allows a user to type in a hostname and select a type of record: A, MX, NS, and TXT. The passed form values are $host and $type, and the below script will accept the variables and output the results according to the record type:</p>
<p>HTML Form:</p>
<p><code>&lt;form action="dns.php" method="POST"&gt;<br />
Hostname: &lt;input type="text" name="host" /&gt;<br />
Type: &lt;select name="type"&gt;<br />
&lt;option value="a"&gt;A&lt;/option&gt;<br />
&lt;option value="mx"&gt;MX&lt;/option&gt;<br />
&lt;option value="ns"&gt;NS&lt;/option&gt;<br />
&lt;option value="txt"&gt;TXT&lt;/option&gt; &lt;/select&gt;<br />
&lt;/form&gt;</code></p>
<p>PHP Script (dns.php):</p>
<pre>&lt;?php

if(!empty($_POST['host']) &amp;&amp; !empty($_POST['type'])){

    // Grab variable from form and define valid types

    $host = $_POST['host'];
    $type = strtoupper($_POST['type');
    $validtypes=array("A","MX","NS","TXT");

    // Check that dns type is defined or allowed

    if(!defined("DNS_" . $type) or !in_array($type,$validtypes)){
       echo "Invalid DNS Type!";
    }else{

       $type = constant("DNS_" . $type);
       $rec = dns_get_record($host, $type);

       // Set result types - can be modified by using available elements from $rec array

       switch($type){
             case DNS_A:
                    $recvals=array("Hostname" =&gt; "host","Type" =&gt; "type", "IP" =&gt; "ip");
                    break;
             case DNS_MX:
                    $recvals=array("Hostname" =&gt; "host","Type" =&gt; "type", "Target" =&gt; "target", "Priority" =&gt; "pri");
                    break;
             case DNS_NS:
                    $recvals=array("Hostname" =&gt; "host","Type" =&gt; "type", "Target" =&gt; "target");
                    break;
             case DNS_TXT:
                    $recvals=array("Hostname" =&gt; "host","Type" =&gt; "type", "Record" =&gt; "txt");
                    break;
        }

      // Output results

      foreach ($rec as $arr =&gt; $num){
             foreach ($recvals as $title =&gt; $value){
                    echo $title . " : " . $num[$value] . "\n";
             }
      }

    }
} else {

     echo "Either hostname or record type is missing";
}</pre>
<p>It&#8217;s of course easy to modify the above code accordingly, and I&#8217;m sure there may be better ways to do this. Feel free to post your own code snippets or comments.</p>
<p><map name='google_ad_map_365_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/365?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_365_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=365&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F30%2Fusing-php-to-perform-dns-lookups' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=365&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/06/30/using-php-to-perform-dns-lookups/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>This Week&#8217;s Sexy Articles</title>
		<link>http://www.v-nessa.net/2010/06/04/this-weeks-sexy-articles-2</link>
		<comments>http://www.v-nessa.net/2010/06/04/this-weeks-sexy-articles-2#comments</comments>
		<pubDate>Fri, 04 Jun 2010 14:41:55 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[sexy sites]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=346</guid>
		<description><![CDATA[The Developer Obsession with Code Names &#8211; Pingdom Website feeling overweight? Slim it down with Smush.it &#8211; Diary of a Ninja Really Useful Tutorials You Should Have Read in May 2010 &#8211; W3 Avenue Beautiful and Useful 404 Error Pages for Inspiration &#8211; 6 Revisions 15 Great Content Management Systems for Designers &#8211; Design Tutorials [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F04%2Fthis-weeks-sexy-articles-2"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F04%2Fthis-weeks-sexy-articles-2&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://royal.pingdom.com/2010/05/27/the-developer-obsession-with-code-names-114-interesting-examples/" target="_blank">The Developer Obsession with Code Names</a> &#8211; Pingdom</p>
<p><a href="http://www.diaryofaninja.com/blog/2010/05/29/website-feeling-overweight-slim-it-down-with-smushit" target="_blank">Website feeling overweight? Slim it down with Smush.it</a> &#8211; Diary of a Ninja</p>
<p><a href="http://www.w3avenue.com/2010/05/31/tutorials-2010-may/">Really Useful Tutorials You Should Have Read in May 2010</a> &#8211; W3 Avenue</p>
<p><a title="Permanent Link to Beautiful and Useful 404 Error Pages for Inspiration" rel="bookmark" href="http://sixrevisions.com/design-showcase-inspiration/beautiful-and-useful-404-error-pages-for-inspiration/" target="_blank">Beautiful and Useful 404 Error Pages for Inspiration</a> &#8211; 6 Revisions<a title="Permanent Link to Beautiful and Useful 404 Error Pages for Inspiration" rel="bookmark" href="http://sixrevisions.com/design-showcase-inspiration/beautiful-and-useful-404-error-pages-for-inspiration/"></a></p>
<p><a href="http://designtutorials4u.com/15-great-content-management-systems-for-designers/" target="_blank">15 Great Content Management Systems for Designers</a> &#8211; Design Tutorials 4 U</p>
<p><a href="http://phpbuilder.com/columns/Jason_Gilmore060210.php3" target="_blank">10 Easy Solutions for PHP String Manipulation</a> &#8211; PHP Builder</p>
<p><a href="http://webhostinghelpguy.inmotionhosting.com/r2j" target="_blank">12 Cross-Browser Compatibility Tools for Designers</a> &#8211; Web Hosting Help Guy</p>
<p><map name='google_ad_map_346_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/346?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_346_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=346&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F04%2Fthis-weeks-sexy-articles-2' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=346&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/06/04/this-weeks-sexy-articles-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Fine Line Between Spam and Email Marketing</title>
		<link>http://www.v-nessa.net/2010/06/03/the-fine-line-between-spam-and-email-marketing</link>
		<comments>http://www.v-nessa.net/2010/06/03/the-fine-line-between-spam-and-email-marketing#comments</comments>
		<pubDate>Thu, 03 Jun 2010 19:26:38 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=354</guid>
		<description><![CDATA[If I had a Viagra pill for every time I confronted a spammer who pulled the &#8220;email marketing&#8221; excuse&#8230; There&#8217;s no debate, no exceptions, and no justification. If you&#8217;re sending out massive amounts of unsolicited email, you&#8217;re a spammer. Period.  You&#8217;re not running a legitimate or respected marketing campaign, you&#8217;re not helping anyone with their [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F03%2Fthe-fine-line-between-spam-and-email-marketing"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F03%2Fthe-fine-line-between-spam-and-email-marketing&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>If I had a Viagra pill for every time I confronted a spammer who pulled the &#8220;email marketing&#8221; excuse&#8230;</p>
<p>There&#8217;s no debate, no exceptions, and no justification. If you&#8217;re sending out massive amounts of unsolicited email, you&#8217;re a spammer. Period.  You&#8217;re not running a legitimate or respected marketing campaign, you&#8217;re not helping anyone with their emotional or erectile dysfunction problems, and in reality, no one cares to read what you have to say.</p>
<p>A lot of hosting providers are cracking down on spammers &#8211; and from experience, I can tell you why:  Spammers are an inconvenience to <em>everyone</em> &#8211; even themselves. They are an inconvenience to me, the system administrator that has to sift through spam complaints and spend hours every week tracking them down.  They are an inconvenience to our customers, who find their email being blacklisted because of a spammer on their network. And finally, they are an inconvenience to you, the Internet user, that has to deal with getting spam on a daily basis because <em>some</em> people have nothing better to do.</p>
<p>And here&#8217;s how you know if you&#8217;re one of those <em>some</em> people:</p>
<ul>
<li>You purposely find ways to circumvent your ISP or host&#8217;s mailing limits instead of simply asking</li>
<li>You&#8217;re harvesting or purchasing email addresses off of websites, other mailing lists, or third parties to compose your recipient base</li>
<li>You&#8217;re sending those people [unsolicited] email advertising yourself, a product, or a website</li>
<li>You use spoofing or other tactics to hide your email address or server information</li>
<li>You don&#8217;t give your <span style="text-decoration: line-through;">victims</span> recipients a way to opt out of your torturous email campaigns</li>
<li>You hide behind the <a href="http://www.ftc.gov/bcp/edu/pubs/business/ecommerce/bus61.shtm" target="_blank">CAN SPAM</a> law to justify your behavior</li>
<li>You get the slight inkling that people hate you for what you do</li>
</ul>
<p><strong>So what&#8217;s the fine line between spam and email marketing? </strong></p>
<p>It&#8217;s all about honesty and consent.  If I contact a fellow blog owner requesting a link exchange, I wouldn&#8217;t technically consider that spam. If I send the same email to 40 other people, I&#8217;m crossing the line.  A legitimate, non-spammy email campaign would consist of a database of opted-in users, and email content consistent with what those users requested to be in the loop for.  If any of those users decide they don&#8217;t want to participate anymore, they are given a quick and easy way to remove themselves from the list.  The fine line between spamming and email marketing is the concept of opting in. Simply put, <strong>email marketers use opt-in lists, spammers don&#8217;t</strong>.</p>
<p>And no, I&#8217;m not talking about purchasing opt-in lists that other people have compiled.</p>
<p>Spammers have ruined the concept of email marketing enough to where now even legitimate email marketers are being accused of spamming, and many hosts won&#8217;t even work with them.  That&#8217;s not all hosts are doing to fight back, either.  Many larger hosting providers are so tired of dealing with spammers on their network that they impose mailing limitations that tend to inconvenience other users. Here are just a few:</p>
<ul>
<li>Limiting the number of emails sent per minute, hour, or day</li>
<li>Limiting the number of recipients that can exist in a single email or BCC field</li>
<li>Locking outbound SMTP connections so scripts can&#8217;t send email from remote servers</li>
<li>Blocking email sent from certain system users (like the Apache user), requiring the use of authenticated mail sessions</li>
</ul>
<p>For everyone else, here are a few tips on dealing with SPAM:</p>
<ul>
<li>Delete it &#8211; it takes two seconds</li>
<li>Learn what a <a href="http://www.spamfighter.com/" target="_blank">spam filter</a> is, and use it</li>
<li>Stop trying to play Internet police. Feel free to report spam to the ISP or host, but don&#8217;t start spouting off with legal threats. It&#8217;s not going to change the fact that millions of spam emails are sent every day, and no court is going to waste their time on you</li>
<li>Don&#8217;t assume that the ISP or host can read minds &#8211; do you think they would have intentionally allowed a spammer to sign up for their service?</li>
</ul>
<p>And for ISP&#8217;s and hosts, you have responsibilities as well:</p>
<ul>
<li>Don&#8217;t be afraid to impose the aforementioned limitations on your servers. Your goal should be to look out for the best interests of your customers as a whole</li>
<li>Require justification from users that want to send large mailing lists, asking them how much email they are sending, who they are sending to, and whether they have an opt-in/out method</li>
<li>Set up abuse@ and postmaster@ email addresses, which will usually be where complaints are sent to. This way you&#8217;re aware of users that may be abusing your network, even if</li>
<li>Sign up for feedback loops, so automated spam reports from various email providers are sent to you to review</li>
<li>Deal with spammers ASAP. Not doing so can end up causing your network to get blacklisted, or have complaints escalated to cancellations from your customers &#8211; or even legal threats</li>
</ul>
<p><map name='google_ad_map_354_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/354?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_354_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=354&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F06%2F03%2Fthe-fine-line-between-spam-and-email-marketing' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=354&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/06/03/the-fine-line-between-spam-and-email-marketing/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Programming Tip: Assume Your Users are Idiots</title>
		<link>http://www.v-nessa.net/2010/05/30/programming-tip-assume-your-users-are-idiots</link>
		<comments>http://www.v-nessa.net/2010/05/30/programming-tip-assume-your-users-are-idiots#comments</comments>
		<pubDate>Mon, 31 May 2010 03:52:50 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=348</guid>
		<description><![CDATA[Any programmer knows the golden rule of programming &#8211; no matter how well you&#8217;ve coded an application, there&#8217;s always going to be something wrong with it. I&#8217;ve done enough development work to have a lasting suspicion that if there&#8217;s a bug or hole to be found, someone will stumble upon it and rub it in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F30%2Fprogramming-tip-assume-your-users-are-idiots"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F30%2Fprogramming-tip-assume-your-users-are-idiots&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Any programmer knows the golden rule of programming &#8211; no matter how well you&#8217;ve coded an application, there&#8217;s always going to be something wrong with it. I&#8217;ve done enough development work to have a lasting suspicion that if there&#8217;s a bug or hole to be found, someone will stumble upon it and rub it in your face.</p>
<p>Here&#8217;s an interesting fact:</p>
<p><strong>There&#8217;s no such thing as a bug-free application.<br />
</strong></p>
<p>No amount of poking, prodding, testing, slurping, or caressing is going to find every possible fault that can exist in an application. Somewhere along the line, one of your users is going to trigger a problem and cause you to spend a few hours patching code.  It&#8217;s like <a href="http://www.v-nessa.net/2007/01/28/im-so-smart" target="_blank">idiot-proofing a microwave</a> &#8211; you can&#8217;t reasonably predict every possible thing that a user can do, you just do what you can and hope for the best.</p>
<p>The good thing about these idiots is that they make us better programmers.  To be a better programmer, you have to think like an idiot and apply some basic principles:<a href="http://www.v-nessa.net/wp-content/uploads/2010/05/idiot-picture.jpg" rel="lightbox"><img class="alignright size-full wp-image-349" title="idiot-picture" src="http://www.v-nessa.net/wp-content/uploads/2010/05/idiot-picture.jpg" alt="" width="375" height="325" /></a></p>
<p><strong>1. Validation</strong></p>
<p>Check and maybe even double-check all types of input and assume the worst. Sure, maybe that user didn&#8217;t know that Sex referred to gender, but you should have thought of that.  Always take into account blank, malformed, incorrect, malicious, and duplicate data.</p>
<p><strong>2. Default Actions</strong></p>
<p>Any time you use conditionals, always combine validation with a default action, in case something unexpected happens. Do you know what your application is going to do if a specified condition isn&#8217;t met?</p>
<p><strong>3. User behavior</strong></p>
<p>Some people do things you don&#8217;t want them to, but you have to be ready for it anyways.  Does your application work correctly if people hit the &#8220;back&#8221; or &#8220;refresh&#8221; buttons? Is it going to cause a problem if someone bypasses your lightbox and opens a link in a new tab instead? Or bookmarks a page that was meant to be accessed from a login screen?</p>
<p><strong>4. Acceptance</strong></p>
<p>Accept the fact that no matter what advice I give, you&#8217;re still never going to make it perfect.</p>
<p>And don&#8217;t forget &#8211; testing, testing, testing. While some people I deal with like to believe that I don&#8217;t actually test <em>anything</em>, I do &#8211; I just also know the golden rule of programming and that there&#8217;s no way around it.  Testing is an ongoing process and requires both automated and manual work. Don&#8217;t knowingly leave a bug or security flaw in place and assume it will go unnoticed &#8211; trust me, it won&#8217;t.  If there&#8217;s one thing idiots are good at, it&#8217;s making <em>you</em> look like an idiot.</p>
<p><map name='google_ad_map_348_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/348?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_348_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=348&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F30%2Fprogramming-tip-assume-your-users-are-idiots' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=348&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/05/30/programming-tip-assume-your-users-are-idiots/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ReviewMe Had an Oopsie</title>
		<link>http://www.v-nessa.net/2010/05/29/reviewme-had-an-oopsie</link>
		<comments>http://www.v-nessa.net/2010/05/29/reviewme-had-an-oopsie#comments</comments>
		<pubDate>Sat, 29 May 2010 14:59:07 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[oops]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=341</guid>
		<description><![CDATA[There&#8217;s a common understanding in the developer community that when you&#8217;re testing code, don&#8217;t do it on a live site. And if you do, make sure it&#8217;s transparent to the user.  This faux pas tends to be unforgivable when you&#8217;re a major review site getting thousands of hits per day. I hope I don&#8217;t get [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F29%2Freviewme-had-an-oopsie"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F29%2Freviewme-had-an-oopsie&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>There&#8217;s a common understanding in the developer community that when you&#8217;re testing code, don&#8217;t do it on a live site. And if you do, make sure it&#8217;s transparent to the user.  This faux pas tends to be unforgivable when you&#8217;re a major review site getting thousands of hits per day.</p>
<p>I hope I don&#8217;t get sued for this.</p>
<p>The other night I was logged into my ReviewMe account to add one of my sites, and upon addition some code popped up that probably shouldn&#8217;t have:</p>
<p style="text-align: center;"><a href="../wp-content/uploads/2010/05/reviewme.png"><a href="http://www.v-nessa.net/wp-content/uploads/2010/05/reviewme.png" rel="lightbox"><img class="aligncenter size-full wp-image-342" title="reviewme" src="http://www.v-nessa.net/wp-content/uploads/2010/05/reviewme.png" alt="" width="500" height="283" /></a><br />
</a></p>
<p><a href="http://www.v-nessa.net/wp-content/uploads/2010/05/reviewme.png"><br />
</a>It looks like someone was doing some testing and was echoing out some post variables as an array, and forgot to remove it.  This goes to show: don&#8217;t test this kind of stuff on a live site where your users will be able to see it.</p>
<p><map name='google_ad_map_341_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/341?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_341_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=341&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F29%2Freviewme-had-an-oopsie' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=341&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/05/29/reviewme-had-an-oopsie/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>This Week&#8217;s Sexy Articles</title>
		<link>http://www.v-nessa.net/2010/05/28/this-weeks-sexy-articles</link>
		<comments>http://www.v-nessa.net/2010/05/28/this-weeks-sexy-articles#comments</comments>
		<pubDate>Fri, 28 May 2010 18:32:56 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[sexy sites]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=339</guid>
		<description><![CDATA[How to Design a Clean and Minimal Business Website :: Voosh Themes 10+1 Things they Never Teach In College About Programming :: Making Good Software 10 Free Web Hosting Control Panels to Manage Servers Easier :: Web Resources Depot How to Fix PHP Vulnerabilities (So Your Site Won&#8217;t Get Hacked) :: Code Diesel How to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F28%2Fthis-weeks-sexy-articles"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F28%2Fthis-weeks-sexy-articles&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.vooshthemes.com/blog/design-tutorial/how-to-design-a-clean-and-minimal-business-website/" target="_blank">How to Design a Clean and Minimal Business Website</a> :: Voosh Themes</p>
<p><a href="http://www.makinggoodsoftware.com/2010/05/27/10-things-they-never-teach-in-college-about-programming/" target="_blank">10+1 Things they Never Teach In College About Programming</a> :: Making Good Software</p>
<p><a href="http://www.webresourcesdepot.com/10-free-web-hosting-control-panels-to-manage-servers-easier" target="_blank">10 Free Web Hosting Control Panels to Manage Servers Easier</a> :: Web Resources Depot</p>
<p><a href="http://www.codediesel.com/php/how-to-fix-php-vulnerabilities/" target="_blank">How to Fix PHP Vulnerabilities (So Your Site Won&#8217;t Get Hacked)</a> :: Code Diesel</p>
<p><a href="http://php-security.org/2010/05/26/mops-submission-10-how-to-manage-a-php-applications-users-and-passwords/index.html" target="_blank">How to manage a PHP application’s users and passwords</a> :: PHP Security</p>
<p><a href="http://www.webdesign-spot.com/2010/how-to-create-a-captcha-system-with-php/" target="_blank">How to Create a Captcha System with PHP</a> :: Webdesign Spot</p>
<p><a href="http://www.catswhocode.com/blog/best-practices-for-coding-html-emails" target="_blank">Best Practices for Coding HTML Emails</a> :: Cats Who Code</p>
<p><map name='google_ad_map_339_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/339?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_339_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=339&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F28%2Fthis-weeks-sexy-articles' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=339&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/05/28/this-weeks-sexy-articles/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.3: Why We&#8217;re All Late to the Party</title>
		<link>http://www.v-nessa.net/2010/05/27/php-5-3-why-were-all-late-to-the-party</link>
		<comments>http://www.v-nessa.net/2010/05/27/php-5-3-why-were-all-late-to-the-party#comments</comments>
		<pubDate>Thu, 27 May 2010 18:59:13 +0000</pubDate>
		<dc:creator>Nessa</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.v-nessa.net/?p=334</guid>
		<description><![CDATA[It&#8217;s been almost a year since the PHP 5.3 branch was released to the PHP community, and yet we&#8217;re all still in the shadow of PHP 5.2.  If you&#8217;re just a faithful customer wondering why your host isn&#8217;t getting with the times, I&#8217;ll tell you exactly why: We don&#8217;t stock enough diapers to keep up [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F27%2Fphp-5-3-why-were-all-late-to-the-party"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F27%2Fphp-5-3-why-were-all-late-to-the-party&amp;source=nessa421&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>It&#8217;s been <a href="http://www.php.net/archive/2009.php#id2009-06-30-1" target="_blank">almost a year</a> since the PHP 5.3 branch was released to the PHP community, and yet we&#8217;re all still in the shadow of PHP 5.2.  If you&#8217;re just a faithful customer wondering why your host isn&#8217;t getting with the times, I&#8217;ll tell you exactly why: <em>We don&#8217;t stock enough diapers to keep up with that ish.</em></p>
<p>Let me talk about <em>you</em>, the common website owner, that runs a simple Drupal or WordPress site.  You didn&#8217;t sign up with your host to go around in circles over compatibility problems that could have been avoided by your host doing a little research. As a programmer, I would hold it to any site owner to check their site&#8217;s requirements and the offerings of their host before they unnecessarily waste a lot of time and money, but as a system administrator I frown upon shared hosting providers offering software with known <a href="http://www.v-nessa.net/wp-content/uploads/2010/05/party-hat2.jpg" rel="lightbox"><img class="alignright size-full wp-image-338" title="party-hat" src="http://www.v-nessa.net/wp-content/uploads/2010/05/party-hat2.jpg" alt="" width="100" height="143" /></a>compatibility issues just to be able to advertise as the &#8220;latest and greatest&#8221;. The latest isn&#8217;t always the greatest, and it won&#8217;t be until the community catches up with what the greatest has to offer.</p>
<p>I&#8217;ve had numerous discussions with my superiors about whether to upgrade to PHP 5.3, and the end result is pretty much the same &#8211; <em>we&#8217;re just not ready.</em> And neither are our customers, or the developers of the applications they use.  And trust me &#8211; this is normal. We all went through the same thing when PHP 4.2 came out, and again with PHP 5, and <em>again</em> with PHP 5.2.  That being said, this is why all the good hosts are now also holding off jumping on the PHP 5.3 bandwagon:</p>
<ul>
<li>Lack of compatibility:  Many open source applications and frameworks (such as Drupal, Joomla, Magento, and even parts of WordPress) are not fully compatible with PHP 5.3 yet</li>
<li>No Zend Optimizer or Zend Guard support</li>
<li>It&#8217;s not required for PCI compliance yet, which is one of the main reasons why hosts upgrade PHP on their servers</li>
</ul>
<p>PHP 5.3 does have a lot of new features and functions to offer, and it will eventually wiggle its way into mainstream hosting -  it&#8217;s just not ready for the shared hosting population yet until everyone else catches up.  Most hosts (including <a href="http://inmotionhosting.com" target="_blank">IMH</a>) will still offer PHP 5.3 as an optional upgrade for customers on VPS or Dedicated servers, or as an optional move to a server that has that version. In the meantime, start upgrading your applications and keep tabs on your softwares&#8217; developers to find out when php 5.3 support will be available.  PHP 5.2 will likely become obscure near the end of 2010 or early 2011 in favor of 5.3, and you should be ready when it is.</p>
<p><map name='google_ad_map_334_7fa65e237551a74a'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/334?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_334_7fa65e237551a74a' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=334&amp;url= http%3A%2F%2Fwww.v-nessa.net%2F2010%2F05%2F27%2Fphp-5-3-why-were-all-late-to-the-party' /></p><img src="http://www.v-nessa.net/?ak_action=api_record_view&id=334&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.v-nessa.net/2010/05/27/php-5-3-why-were-all-late-to-the-party/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.757 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-03 06:24:02 -->
