Like planetsim said, you cannot use PHP to write a file from the remote server to the local disk.
You can, however, have that file created and send a request to the client to download that file, and then delete the downloaded file from the server.
ASP, ASP .NET, C# or one of those copywritten pieces of crap can do that though. That's why Microsuck made it...to stick windows updates and whatever else they want on your PC. But, generally, the client has to apporve such modifications before the server makes them locally.
I could be wrong about the asp, .net, c# though....but I dont think I am.