Chcę za pomocą skryptu PHP otworzyć plik txt na moim serwerze w domu z innego serwera (Home.pl). Serwer jest uruchomiony na Raspberry Pi i jest ustawione przekierowanie portów na wewnętrznym ruterze.
Skrypt PHP:
$filePath_temp = "ftp://82.160.79.52:85/nettemp/temperatury.txt";
Niestety sypie błędami:
Warning: fopen(ftp://82.160.79.52:85/nettemp/temperatury.txt) [function.fopen]: failed to open stream: operation failed in /wachcio/nettemp/index.php on line 17
Warning: filesize() [function.filesize]: stat failed for ftp://82.160.79.52:85/nettemp/temperatury.txt in /wachcio/nettemp/index.php on line 17
Warning: fread(): supplied argument is not a valid stream resource in /wachcio/nettemp/index.php on line 17
Co robię nie tak? Może to wina ustawienia serwera na Raspberry? W przeglądarce link otwiera się normalnie...