Thursday, December 30, 2010

A Desired Feature for Cydia

I’m not really a gigantic apple fan, but thanks to my parents and the art of
Hand-Me-Downs I managed to acquire an iPhone 3G.

I’ve been using this 3G for awhile, and
of course one of the things I absolutely had to do with it was Jailbreak the device.  I don’t
pirate or anything, but Jailbreaking it does bring fantastic changes to it that simply would not have been
possible on the 3G otherwise.

For example, I use Z-Toggle and Bootlace: Z-Toggle for
activating nice little features (Background Wallpaper, Battery Percentage) and Bootlace for giving me
Android as an optional boot-method (iDroid is far from completion, though), and I just now finished
installing and modifying the settings for Backgrounder, since 4.2 broke native multi-tasking on the old 3G
device (I have no idea why), and I’ve already got accustomed to using it.

But there is
one problem with Cydia I don’t believe has been addressed yet, and it would be nice if Cydia were to
automatically store your custom sources and a list of the programs you’ve installed, so that when you
re-install a new iOS (by starting from scratch so that you don’t continually lose space on your iPhone) and
re-jailbreak your device, it sees the file and also helps convert your iPhone back to the jailbroken way it
was.

This would be a very nice feature, and one I’m sure anyone would
welcome.

Sunday, December 26, 2010

A “Revolutionary” Way to Validate Email Input

I’m not talking about confirming email, where you have to make sure that the
user owns an email address, but I am talking about a way to confirm that an email entered will probably work
WITHOUT succumbing to regex, AND it’s relatively quick!

[codesyntax
lang=php]
function validate_email($email)
{
$email_parts =
explode("@",$email);
if(count($email_parts)) != 2) { return FALSE; } // You can only have one @
in an email address.
$domain = $email_parts[1];
if(!getmxrr($domain,$array)) { return
FALSE; } // This domain doesn't have any MX Records.
return TRUE; // Everything else is 'valid.'
}
[/codesyntax]