Jump to content

Edit a file on a separate server


dabigchz

Recommended Posts

Naming a file "impossible to guess" really isn't secure at all (security by obscurity is no security in and of itself). If the website can be FTP'd to, you can FTP via php. Here are some simple examples to get you started: http://us.php.net/manual/en/ftp.examples.php

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:[email protected]/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?

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.