So, I have 5-6 pages of requirements. I'm trying to build this application in PHP based on the requirements. I want to transfer files from one server to the other server in LAN, and then send a shell command to the other server to find out if the file has been transferred successfully. In php, I can transfer files using FTP, and send shell commands using SSH. Using the methods above, I will need to open the connection with the server first, but I don't know the ftp server name, domain name, ip address, or anything like that. I only know the the server ID (I'm not sure what this ID is, but I guess it is like the computer's name). An example of the server ID is: "c23bap234" How do I open a connection with just that server ID? These servers are in the same building, have LAN connection, don't have connection to the outside world. These machines have PHP, Apache, ... installed. If my post doesn't make sense to you, it's because I'm a learner. I hope someone can help me on this. Thanks in advance.
I can tell you that they are window servers, but I'm not 100% sure. What would be the different between the two? I can run shell commands on windows but not Linux? I don't know what to do with the ping, and tracert commands. I have a general idea, but can you give more details? Thank you.
In case of windows, you can run ping or tracert and it will give you the ip. You need to open command prompt (Start > Run > type "cmd" w/o quotes). then issue these commands: ping c23bap234 Code (markup): tracert c23bap234 Code (markup): "c23bap234" is the computer name of the server.
I have used ping, and tracert a few times before. I can just type in the "computer name", and it will find out the ip address for me? what if I type in the name of the other computer in the same Lan network? will it find out the ip address of that computer? I'm supposed to build an application that will run on one of these servers. I can use $_SERVER['REMOTE_ADDR'] to find out the ip of the host server.