Web

Check if a URL exists/is online

Function to check if a URL is online/exists. function is_valid_url($url){    $url = @parse_url($url);    if (!$url)    {        return false;    }    $url = array_map(‘trim’, $url);    $url[‘port’] = (!isset($url[‘port’])) ? 80 : (int)$url[‘port’];    $path = (isset($url[‘path’])) ? $url[‘path’] : ”;    if ($path == ”)    {   […]

Read More
Network

Verifying DNS mappings

An improperly configured DNS setup can be really annoying. You want to make sure that your mappings work both ways: Each hostname should resolve to an address, and that address ought to resolve back to the proper hostname. If an address on your subnet(s) has been assigned a reverse pointer to a hostname, that hostname […]

Read More
Linux

Watermark pictures using exiv2

Quick and dirty batch script to watermark and add IPTC data to a set of files in the supplied dir to -Copyright. #!/bin/bash # Copyright Andy Wright – www.litost.org 2006. # You have permission to do what you want with it as long as you don’t # blame me if it insults your mother etc. […]

Read More