copy files from one server to another using php
I have two similar websites.Some of the content are same in both sites.I have some files in specific folder in one website say A.I want to copy some specific files from Website A to website B. I have tried ftp functions in php but not working. <?php // define some variable $local_file = 'eg.html'; $server_file = 'http://example.com/horoscope/M12459TAM_03092009_123239.html'; // set up basic connection $conn_id = ftp_connect("example.com"); // login with username and password $login_result = ftp_login($conn_id, 'username', 'password'); echo is_array(ftp_nlist($conn_id, ".")) ? 'Connected!' : 'no
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.