...............HERE1...............mporarily unavailable'; $message = 'Our service is currently undergoing scheduled maintenance.

Things should not last very long, thank you for your patience and please excuse the inconvenience'; yourls_die( $message, $title , 503 ); } } // Toggle maintenance mode function yourls_maintenance_mode( $maintenance = true ) { yourls_update_option( 'maintenance_mode', (bool)$maintenance ); } // Check if a string seems to be UTF-8. Stolen from WP. function yourls_seems_utf8($str) { $length = strlen($str); for ($i=0; $i < $length; $i++) { $c = ord($str[$i]); if ($c < 0x80) $n = 0; # 0bbbbbbb elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb elseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb elseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb elseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b else return false; # Does not match any model for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ? if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80)) return false; } } return true; } // Quick UA check for mobile devices. Return boolean. function yourls_is_mobile_device() { // Strings searched $mobiles = array( 'android', 'blackberry', 'blazer', 'compal', 'elaine', 'fennec', 'hiptop', 'iemobile', 'iphone', 'ipod', 'ipad', 'iris', 'kindle', 'opera mobi', 'opera mini', 'palm', 'phone', 'pocket', 'psp', 'symbian', 'treo', 'wap', 'windows ce', 'windows phone' ); // Current user-agent $current = strtolower( $_SERVER['HTTP_USER_AGENT'] ); // Check return str_replace( $mobiles, '', $current ) != $current; }...............HERE2...............