elsad,
i had a brief chance to look at the code , i think the problem is the following :
When you login through ftp your directory will default to the user default directory as specified by the isp provider so say you logged in as "elsad" the directory would be elsad , what to do now is after a successful connection change the directory e.g
$result = ftp_chdir($conn_id , "../../web")
here i am going back two directories and then going forward to the web directory .
what i would suggest to you is to login from a command line and figure out the path to the photos directory
then alter the code above as required .
Also after changing directories you don't need the following which you had
$path = sprint("/www.mydomain.f2s.com/photo/s.jpg",$filename);
$path2=sprintf("/www.mydomain.f2s.com/photo/m%s.jpg",$filename);
all you need is to specify the file name as the path so when you a putting the file it will be like
$upload = ftp_put($conn_id, $destinationfile, $file, FTP_BINARY);
where destination file is whatever you want to call it .
also why are you trying to delete the localfile ??
I'll test out the ftp code that i wrote tonight and then send it on to you .
Regards,
Garry.