PDA

View Full Version : Is this possible?



kennymoens
September 21st, 2001, 11:35
Hi,

Can I get the content from a text file that is stored on another server (both servers are mine, but are not with the same FWP).

Can I read the text file, if the text file is stored on Server #1 and the script on Server #2. If yes how?

The script file may be PHP or Perl5.

Kind regards,

Dusty
September 21st, 2001, 13:20
Is this file web accessible? It's quite easy if it is. It's still possible if it's not, but it would simply matters greatly if it was.

Perl:

use LWP::Simple;
$file=get "http://url/to/file";

PHP:

$f=fopen("http://url/to/file","r");
$file=fread($f,size_of_file_here);
fclose($f);