1<?php
2
3$method = $_SERVER['REQUEST_METHOD'];
4
5switch ($method) {
6 case 'GET':
7 //Here Handle GET Request
8 echo 'You are using '.$method.' Method';
9 break;
10 case 'POST':
11 //Here Handle POST Request
12 echo 'You are using '.$method.' Method';
13 break;
14 case 'PUT':
15 //Here Handle PUT Request
16 echo 'You are using '.$method.' Method';
17 break;
18 case 'PATCH':
19 //Here Handle PATCH Request
20 echo 'You are using '.$method.' Method';
21 break;
22 case 'DELETE':
23 //Here Handle DELETE Request
24 echo 'You are using '.$method.' Method';
25 break;
26 case 'COPY':
27 //Here Handle COPY Request
28 echo 'You are using '.$method.' Method';
29 break;
30
31 case 'OPTIONS':
32 //Here Handle OPTIONS Request
33 echo 'You are using '.$method.' Method';
34 break;
35 case 'LINK':
36 //Here Handle LINK Request
37 echo 'You are using '.$method.' Method';
38 break;
39 case 'UNLINK':
40 //Here Handle UNLINK Request
41 echo 'You are using '.$method.' Method';
42 break;
43 case 'PURGE':
44 //Here Handle PURGE Request
45 echo 'You are using '.$method.' Method';
46 break;
47 case 'LOCK':
48 //Here Handle LOCK Request
49 echo 'You are using '.$method.' Method';
50 break;
51 case 'UNLOCK':
52 //Here Handle UNLOCK Request
53 echo 'You are using '.$method.' Method';
54 break;
55 case 'PROPFIND':
56 //Here Handle PROPFIND Request
57 echo 'You are using '.$method.' Method';
58 break;
59 case 'VIEW':
60 //Here Handle VIEW Request
61 echo 'You are using '.$method.' Method';
62 break;
63 Default:
64 echo 'You are using '.$method.' Method';
65 break;
66}
67
68
69?>