TWebCopy upload

Hi.
I need to upload files to a PHP script on my server. I'm trying to use the example script available at the TMS TwebCopy web page (shown below), but it doesn't seem to work.

"with WebCopy.Items.Add do  
begin  
  URL := 'http://www.myserver.com/uploadscript.asp';  
  Protocol := wpHTTPUpload;  
  TargetDir := 'c:\temp';   
  TargetFileName := 'myfile.txt';   
end;  
WebCopy.Execute; "

I noticed the example uses an ASP script. Can I use a PHP script instead? 
One more thing: the TargetDir and URL seems to be inverted, as if it was a download operation. Is this example correct?
Thank you

Did you replace the URL with the correct URL of your PHP script?
Other than this, the sample script is correct.

Is your script being accessed at all? If so, what exact error do you get?

Hi Bruno, thank you for your answer.

Yes, I did replace the URL, and the PHP script is being accessed, as it creates a folder when it happens, and the folder is being created.
Webcopy gives me an errorCode 87, but the ErrorInfo string has only a few unreadable characters like "$#@%" or something.
The same PHP script accept files without any problems when I submit then using an HTML form.
I don't know whats going wrong

Forget about that errorcode, it was caused by a corrupted file. It disappeared when I used another one. But the upload doesn't work anyway.

One more question: TWebCopy uses HTTP upload as FILES or POST?

It uses HTTP PUT. Is your script implemented for HTTP PUT?