<?php $file = fopen("ftp://ftp.php.net/incoming/outputfile", "w"); if (!$file) { echo "<p>Unable to open remote file for writing.\n"; exit; } fputs($file, "$HTTP_USER_AGENT\n"); fclose($file); ?>