"; return true; } return false; } if ($_GET["content"] == "true") { echo "headers CONTENT_TYPE and CONTENT_LENGTH should be present.
"; } else { echo "headers CONTENT_TYPE and CONTENT_LENGTH should not be present.
"; } $content_type = checkHeader("CONTENT_TYPE"); $content_length = checkHeader("CONTENT_LENGTH"); if (!$content_type && !$content_length) { echo "headers CONTENT_TYPE and CONTENT_LENGTH are not present.
"; } echo "
"; if ($_GET["content"] == "true") { echo "POST data should be present.
"; } else { echo "no POST data should be present.
"; } if (sizeof($_POST) > 0 || sizeof($_FILES) > 0) { echo "POST data is present.
"; } else { echo "no POST data is present.
"; } echo "" ?>