Short URL:
Original URL:
0) { $captchaInput = getRequestParameter($_SESSION['CAPTCHA_FIELD']); $captchaValid = false; if (empty($captchaInput) == false) { $captchaValid = $captcha->validateCaptcha($captchaInput); } if ($captchaValid == true) { $shortId = $urlShortener->shortenUrl($longurl, $plain); if ($shortId == NULL) { $msgError = "The given URL could not be shortened."; } else { $msgShort = SERVICE_BASE_URL . $shortId; $msgLong = $longurl; $longurl = ""; } } else { $msgError = "Captcha invalid. Are sure you're not a bot?"; } } $displayCaptcha = $captcha->generateAndUseCaptcha(); $statsOverview = $urlShortener->getStatisticsOverview(); echo "<" . "?xml version=\"1.0\"?".">\n"; ?>