Cryptography Challenge

Here’s a challenge. Decrypt… aWt6eWZlaWEKfWJjeWFvcwppa3p5ZmVpYQpvaWJlCmZjZ2sKZmNnawp5 emtpbwpub2Z+awpleWlreApkZXxvZ2hveApvaWJlCmhrZG0KeXpraW8Ka Wt6eWZlaWEKemt6awppa3p5ZmVpYQpmY2drCm9pYmUKa2Z6YmsKeW NveHhrCm9pYmUKeXpraW8KZmNnawpvaWJlCmtmemJrCnxjaX5leApvaW JlCnl6a2lvCmtmemJrCnl6a2lvCmlia3hmY28KZXlpa3gKZ2NhbwpnY2FvCm9 pYmUKZGV8b2dob3gKfmtkbWUKeXpraW8KZXlpa3gKZGV8b2dob3gKeX praW8KfmtkbWUKZXlpa3gKaHhrfGUKc2tkYW9vCmNkbmNtZQpkZXxvZ2h veAphY2ZlCnljb3h4awp+a2RtZQpvaWJlCnhlZ29lCnl+ZXoKaWJreGZjbwpl eWlreAp5fmV6Cn9kY2xleGcKYWNmZQp5emtpbwppYmt4ZmNvCmZjZ2sK a2Z6YmsKY2RuY21lCmdjYW8KY2RuY21lCmRlfG9naG94Cm1lZmwKeXpra W8KaWJreGZjbwp4ZWdvZQpvaWJlCm5vZn5rCmNkbmNtZQp+a2RtZQp5f mV6

PHP Domain Class

On Usenet an often-asked question is how to programmatically determine the “domain” of a particular hostname. That is, excluding the components traditionally thought of as subdomains. As an example, groups.google.com and www.google.com both have a domain of google.com. Invariably, one answer comes back stating that you just need to chop off everything from the front, … Continued

PHP Linkifier

Here’s a nifty bit of code I wrote a while back (utilising a function from PHP SmartyPants) that takes a bunch of HTML, searches it for some word or phrase that you specify, and turns all occurances of it into a link, unless it’s already a link!

PHP vs Perl

Here's a simple program which calculates, to eight decimal places, the value of the Golden Ratio φ implemented in both PHP and Perl, to demonstrate their similarities. Perl #!/usr/bin/perl $a = 1; $b = 1; $c = undef; $psi_old = undef; print “Approximating psi…\n”; while (1) { $psi = sprintf(‘%.08f’, $b/$a); last if ($psi_old eq … Continued