Im trying to create my own share application but having some troubles with the responses to the phone!

I've gotten as far as:

1. I have my own custom "Service provider" in the Share Online app.
2. I can select an image and choose to transfer it.
3. The image will successfully get uploaded to my server.

This is where my problem start, I don't know what to respond to the phone when everything is done which causes the phone to either flag the file as "Could not transfer" or "Waiting for transfer" instead of being flagged as complete and removed from the transfer list.

This is my current response, but I guess i need something more:

PHP Code:
('HTTP/1.1 201 Created');
header('Content-Type: application/atom+xml');
"<?xml version='1.0' encoding='utf-8'?>";