Jump to content

Transfering Data Between Two Servers


Millar

Recommended Posts

Hello,

 

In my current development I want my main server to store main user account profiles along with other data. When a user wants to partake in an activity at another server related to the project, I want a copy of the user data to be sent to the main server for local reference.

 

I have acheived this using fsockopen from the main server to tell the target server it has data for it, then the target server uses fsockopen to contact the main server for the data and then store it:

 

Main Server fsock(Target Server) -> Target Server fsock(Main Server) -> Main Server outputs data -> Target Server saves the data.

 

Now currently this is being performed on the same server, for testing purposes, and still takes over 5 seconds to route all the data and perform the actions, and so I dread to think of the delay between remote servers.

 

So, my question is, is there a faster way to transfer this data between two remote servers (securley)?

 

Thanks.

Link to comment
Share on other sites

run a sql query, changing your host:

$db_name  = "database";   // The name of the database. 
$db_user  = "db_user";   // Your MySQL username. 
$db_password  = "db_password";   // ...and password
$db_host  = "example.com:3306";   // change to your other server name:port number

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.