Please help me to understand how to use the RAW-FTP commands. This is what I have written:
$ftp=fsockopen("$url",21);
echo fgets($ftp,255);
fputs($ftp,"User $uname\r\n");
echo fgets($ftp,255);
fputs($ftp,"Pass $pword\r\n");
echo fgets($ftp,255);
fputs($ftp,"PORT 155,99,173,40,7,199\r\n");
echo fgets($ftp,255);
It works great up until the PORT command that gives the message:
Invalid PORT command.
What is wrong? I need this so I know what PORT to upload data to.
Thanks