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
https://forums.phpfreaks.com/topic/109940-transfering-data-between-two-servers/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.