hitesh Posted July 30, 2007 Share Posted July 30, 2007 Programmers, I have a problem regarding accessing a file remotly. Can someone help me in that? I'll explain my problem thru example. Example : My website is @ http://95.165.168.168/newsite/ this URL. The file which I wanted to access is @ 92.168.165.153 this machine in c://reservation/new.xml location. As you can see 1. My reservation file is on another machine 2. My webapplication is on another server. Now I want my website / webapplication to change the file which is @ 92.168.165.153 server. I have the Admin login information ie. username and password of the this machine. I can able to connect 92.168.165.153 machin thru php FTP code, but I can not able to change the file containts. Can any one suggest me how can I achive this using php code. Hitesh Quote Link to comment https://forums.phpfreaks.com/topic/62433-change-file-remotly-problem/ Share on other sites More sharing options...
Daniel0 Posted July 30, 2007 Share Posted July 30, 2007 You cannot change the file using FTP, but you can delete the old one and upload ap new one. Quote Link to comment https://forums.phpfreaks.com/topic/62433-change-file-remotly-problem/#findComment-310720 Share on other sites More sharing options...
hitesh Posted July 30, 2007 Author Share Posted July 30, 2007 That will also do but in should be in following manner. Read the Old file Add new contains at the end of the Old file (should be done at the Web application server) upload with a new name is this Possible? I have another question too. Was that code has to do anything with this problem? Quote Link to comment https://forums.phpfreaks.com/topic/62433-change-file-remotly-problem/#findComment-310757 Share on other sites More sharing options...
hitesh Posted August 8, 2007 Author Share Posted August 8, 2007 Oops I did it again... I actually Rename and modify the file only using FTP function. for Rename ftp_rename($conn_id, $local_file, $server_fille)) and for Modify I copied the file on website Server using ftp_get($conn_id, $local_file, $server_file, FTP_BINARY,0)) and than put it back from where I have taken the File. Any way Thank you Quote Link to comment https://forums.phpfreaks.com/topic/62433-change-file-remotly-problem/#findComment-318430 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.