php - passing mysql account to remote server -
I have to connect 2 php pages to 2 different servers,
One "email" "DB (MISCIL) with the table is generated by a PHP page. The other server has a PHP file that needs to be read" email "table ...
another php page
User does not need to be opened
The fact is that I need to make this work with a lot of DB It's not just that I can not store mysql connection parameters on php page 2 server and just open it ... I have to pass the connection advisory every time
For now I have this By using something like, 1 server on the PHP page:
$ socketcon = fsockopen ("http://www.server2.com", $ 80, $ errerno, $ errorstr, 10); If $ $ socketcon {$ socketdata = "GET page2.php? Dbuser = xxx and dbpass = xxx and db = xxx http / 1.0 \ r \ n host: http: //www.server2.com \ r \ n connection: Close \ r \ n \ r \ n "; Fwrite ($ socketcon, $ socketdata); Fclose ($ socketcon); }
But I'm afraid it's too bad to insert parameters in the URL ....
Any thoughts?
One way is to create a "public" webservice with PHP that will receive credentials. If the credentials answer you with the data you need (probably in XML format) Of course all this is more than HTTPS. Then you can "talk" with the service to make DB connections.
Comments
Post a Comment