Jump to content

Edit a file on a separate server


dabigchz

Recommended Posts

Yes, the websites are on different servers. The file I want to edit will be named to be impossible to guess and will be the only file on the server editable by anyone.

 

I was afraid I'd have to do some FTP thing... I just have no idea where to start...

Link to comment
Share on other sites

I need it because websiteb will then read the file and carry on with it.

 

My problem has now changed. Apparently what I tried before should have worked, but for some reason, nothing FTP related works to connect from websitea to websiteb. My original code was basically:

 

$text = "Write this to the file";

$file = fopen("ftp://user:password@websiteb.com/file.txt","w");

fwrite($file, $text);

 

when I run that code, the webpage just takes a long time to load, and when it does load, its just a blank page (and the file isn't written). Any ideas?

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.