Click here to Skip to main content
15,886,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to send the PUT request.
Need PHP code for consuming the webservice and capture the PUT value and returning the response.

The coding needed in PHP.

It is urgent.

I am stuck as to how to send the json value as a put request.

Any solution.
Posted

1 solution

PHP
if($_SERVER['REQUEST_METHOD'] == 'PUT') {
    parse_str(file_get_contents("php://input"),$postValue);
    var_dump($postValue);
}


Now you can perform JSON operations of php on $postValue

I hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900