basically i'm trying to use it to force the creation of a file via ftp it will make the file but not enter any data.
//place file contents here
$somecontent ='text text text';
//checks if it can open file
if (!$handle = fopen('ftp://username:password@directory'.$company.'/'.$name.'/'.$name2, 'a+'))
{
echo "Cannot open file ($name2)";
exit;
}
//writes content to file
if (!fwrite($handle, $somecontent, strlen($somecontent)))
{
echo "Cannot write to file ($name2)";
exit;
}
echo "File ".$name2." created";
//close file
fclose($handle);
Warning: fopen([url]ftp://...@[/url]$directory///.txt): failed to open stream: FTP does not support simultaneous read/write connections.