Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

2008-09-22

In your face



Click image to view larger format

2007-11-23

CAPTCHA verification checklist

  • Verify if the verification code is set on session (isset($_SESSION['captchacode']))
  • Verify if the verification code length is greater than 0
  • Verify if the verification code equals the code entered by the user
  • Unset the code from the session after finishing with all the verifications above

2007-07-21

How to Get the Current Page URL in PHP




function CurrentURL()
{
$url = 'http';

if ($_SERVER["HTTPS"] == "on")
{
$url .= "s";
}

$url .= "://";

if ($_SERVER["SERVER_PORT"] != "80")
{
$url .= $_SERVER["SERVER_NAME"].":".
$_SERVER["SERVER_PORT"].
$_SERVER["REQUEST_URI"];
}
else
{
$url .= $_SERVER["SERVER_NAME"].
$_SERVER["REQUEST_URI"];
}

return $url;
}
?>