Wow, there are an amazing number of bugfixes in this version! Mosu’s been quite busy!
You can download this build from my software page until Mosu’s able to mirror my build.
Wow, there are an amazing number of bugfixes in this version! Mosu’s been quite busy!
You can download this build from my software page until Mosu’s able to mirror my build.
The following throwaway function will convert the first letter of every word comprising a FQDN to an uppercase letter. I did it mostly out of boredom, but secondly to abuse ternary operators.
Here’s the function:
function leetHost($hostName=FALSE) { // What have I been smoking? No, this is not meant to be legible $hostName = (preg_match(’/^\d+\.\d+\.\d+\.\d+/’, $hostName)) ? strtolower(@gethostbyaddr($hostName)) : ((is_string($hostName) && isset($hostName)) ? strtolower($hostName) : ((isset($_SERVER[‘SERVER_NAME’]) ? $_SERVER[‘SERVER_NAME’] : @gethostbyaddr(“127.0.0.1”)))); $hostArray = explode(”.”, $hostName); for ($i = 0; $i < count($hostArray); $i++) { $hostArray[$i] = ucfirst($hostArray[$i]); }} return(implode(”.”, $hostArray)); }The whole of the logic is in the nested tenary operations above. Everything else is just, er, tearing it down, and rebuilding it.
Here’s what those crazy nested ternary operators do: First I test if the given string matches all numerics (likely an IP address, and if it is a string). If so, then convert it to a hostname, and ensure that this is lower case. (Note that this does not actually test for a fully-valid IP address. Any decimals are accepted, so it’s logic would believe that 999.999.999.999 was a valid IP address, however, this is sufficient for this simple little function.)
Secondly, if the hostname is actually set, and it is a string, convert it to lower case, and assume it is valid.
Lastly, if there is no hostname set, default to the webserver’s configured address. If that fails, which it shouldn’t, use localhost, and look up the hostname for that, just to be pedantic.
Pshew.
Now, break the hostname into an array using the periods as delimiters. Convert the first letter of each word to an uppercase letter, and stuff it all back into a single string, replacing the periods. Return that string.
A usage example:
echo “1: ” . leetHost(“203.194.209.85”) . “For my localized testings, I obtain the following:
1: System447.Com
2: Www.Holwegner.Com
3: 66.102.7.99
Note that this simple function doesn’t have issues with hostnames that don’t resolve due to the preceeding ’@’ before the gethostbyname. Sometimes it’s just easiest to fail gracefully.
Is this function entirely worthless? Probably. It’s still better than the other function I was thinking of, which would convert the entire hostname to uppercase, then selectively replace the vowels with lowercase. Perhaps for a future, configurable version of leetHost() ;)
When you view the ‘full view’ version of my article (clicking the ‘comment’ link, or following a full article from off site, there were once two options. My first attempt tried to discern the user’s browser, then forward to an HTML4 friendly page. Otherwise, it sent people to my newer XHTML 1.1 friendly page. Roughly a year ago, I removed the HTML4 friendly page.
It occured to me that it was still difficult to print my page with certain browsers. Most know not to use my CSS markup, however, a few ‘bad’ ones do. This prompted me to create the ‘make printer friendly’ link.
This will render an HTML 2 compatible display of my full article, suitable for printing on everything from Voyager 3 to lynx.
It has also recently come to my attention that a small XHTML error in my ‘site comments’ function was inhibiting Safari 2 users from leaving comments on my site. Oops!
I’ve since fixed it, and tested with Safari 1.3, Opera 8, and Firefox 1.06 (I don’t have Safari 2.0 to test locally, yet) – but I have confirmed that it now works.
All of these functions and additions have been localized for the next release of Rollator; in both Apache mod_rewrite friendly syntax, and with full-encoded URLs (which make it easier for me to develop at home and test – not to mention that some sites still lack mod_rewrite support.)
Wether you use my software, don’t, or just happened to stumble here across this big wide internet, a few dollars will help significantly.
For reference, here’s one report of the Red Cross mismanaging money donated to 9/11:
What’s more, the Savannah chapter “could not provide information regarding cash (and) checks collected.” In Pine Tree, Maine “cash (and) checks (were) unlocked at all times,” and in Los Angeles the chapter there had “no accurate accounting for funds received after Sept. 11,” believed then to total “at least one-half $1 million.”If that’s not enough, here’s yet another:
...Red Cross officials then closed the Liberty Fund, which had received pledges of $543 million and spent $147 million on September 11 relief efforts—less than one third…Despite “The Red Cross” having a black eye, I implore you, please consider a donation towards the Katrina Relief Effort. Remember that anything that you can do to help, will.
My build of MKVToolNix is now sync’d to the most recent release, 1.55.
With this release I’ve changed from ‘Stuffit’ to .tar.bz2 for compression. Let me know how easily you manaage to use this form of archive.
You can download this directly from my sofftware page; please choose a mirror site.