I'm familiar with writing and reading files located on the same server that my PHP or Perl script is running, but what if I needed to write/read files located on a different server? Server A needs to write to and read content on Server B. (I have permissions to read and write on both Server A and Server B.)
In the case of PHP, would I use fsockopen or fopen? Can you give examples of a simple read/write in Perl and/or PHP where the script, executing on Server A (10.10.10.1), is reading/writing to Server B (10.10.10.2) assuming all permissions are set up correctly?