$entry) { $sort_keys[$key2] = $entry[$key]; } return array_multisort($sort_keys, $order, $array); } if (is_readable(DATA_FILE)) { $data = unserialize(gzinflate(file_get_contents(DATA_FILE))); } else { $data = array(); } // If we have exactly one GET arg, we redirect user if (count($_GET) == 1) { // We get the shortened url $get = each($_GET); $short = $get['key']; $url = BASE_URL; if (array_key_exists($short, $data)) { $url = $data[$short]['url']; } // $url is now index.php if no element was found, the right url if found header('location:'.$url); exit(); } ?>
Short link for: '.$url.''; ?>