I am trying to connect ftp server with php script like this : $ftp_server = 'greenscm.in'; $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); $login = ftp_login($ftp_conn, 'greenscm', 'green@#12') or die("Could not login to $ftp_server"); In this script ftp is connect but ftp not login and throw warning : Warning: ftp_login(): Sorry, cleartext sessions are not accepted on this server. in D:\new_xampp\htdocs\holisol_2611\img.php on line 23 Could not login to greenscm.in how can resolve this problem......
Have you realised that you just posted your username and password publicly on the internet? Wonder how long it will take for someone to take over your hosting account.
The answer to the question, btw, is that ftp_connect won't work - the server expects a secure connection, ie sftp - have a look here and see if you can find an answer: http://stackoverflow.com/questions/2172289/connection-to-secure-ftp-server-from-php
Need to figure out if you should be connecting via sftp or ftps. In the case of the former, it's quite a bit more complicated. Personally I use phpseclib for SFTP connections but there are other ways of accomplishing it listed in the stackoverflow link.