Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

set only allow post request to a page - php

//only allow post request
if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
	header('Allow: POST');
	header('HTTP/1.1 405 Method Not Allowed');
	header('Content-Type: text/plain');
	echo "only allow post";
	exit;
}
Source by localhost #
 
PREVIOUS NEXT
Tagged: #set #post #request #page #php
ADD COMMENT
Topic
Name
1+8 =