f.n174 f.n174 - 4 months ago 18
PHP Question

What is the best and easiest way to access files within a linux vps using its external ip?

I have a game server running in a

vps
with
centos 6
.

The game server stores its status data on a text file and i want to access this file from my website server with
php
.

The problem is that it is better to do it without installing something link ftp server on the
vps
. Also i do not know how to set the ftp account directory to my game server directory.

Anyone knows any other simpler way to do so ?

Thanks.

Answer

Use a client which supports SFTP if you are able to connect to your server via SSH.

phpseclib handles the SFTP connection without the need to install an extension. For an example on how to download a file with SFTP go here.