Storing data on a remote server
<?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);
?>
Related examples in the same category