dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: connection establishment with other server (linux or VM)

  1. #1
    Join Date
    Aug 2014
    Posts
    1

    connection establishment with other server (linux or VM)

    I am new to php and i would like to know few functionalities.

    1)I would like to is there way to connect to other server(means other than MYSQL server)?
    If it so then how can i do that.

    2) Is there any possiblities to connect with other server like Linux or VM and fetch or read the file. if we have kindly share on how..

    Thank you in advance for your sharing your thoughts.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    20,320
    You're probably looking at FTP for exchanging files with another server. You could also look at SSH2 for more options (including SFTP).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,968
    You also have sockets as well cURL, you need to consider what it is you are trying to achieve. Is the server on the same network or is it a remote server?
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  4. #4
    Join Date
    Aug 2014
    Posts
    12
    Hi Radhakrishna115,
    I would like to is there way to connect to other server(means other than MYSQL server)?
    Sure. You can connect to everything you want. For example if you want to connect to MongoDB you have to use MongoDB's protocol. You can use it on the binary level (using self-written C extension) or you can use "mongodb-php-driver" (MongoDB) class.
    Or if you want to connect to Elastic Search you can use HTTP protocol and cURL library.

    Is there any possiblities to connect with other server like Linux or VM and fetch or read the file. if we have kindly share on how..
    Sure. You can connect to other computer and read files. But reading files is a one of the all possible functionality. And for this functionality was created FTP protocol (not only for reading of course. You can read/write/delete/edit files). Or if you want to connect to other computer and execute shell commands, you can use SSH protocol.
    If you want something special you have to create your's protocol.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles