Code 200 is the standard response to a successful request ... Even repeating an empty json line will result in a status of 200 OK.
echo json_encode(array());
If all you want to do is signal to the client that some process has been completed, you can simply respond to a status message or even an empty object, as shown above.
If you really want to manually send the 200 header, you can do it like this:
header("Status: 200");
Make sure this header is sent before you send any to the server.
source share