[PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Scott
Hi all, I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. Example remote file: ?php $user = joe; $pass = 1234; ? Example local file: ?php include

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread cajbecu
i suggest you: database.conf (the file on another server) host=localhost user=test pass=test anothervar=anothervalue on your script: $temp = file(http://../database.conf); foreach($temp as $val) { $temp2 = explode(=,$val); $$temp2[0] = $temp[1]; } after that, you`ll have: $host =

RE: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Ray Hauge
@lists.php.net Subject: [PHP] Remote MySQL connection via PHP file Hi all, I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. Example remote file: ?php $user = joe; $pass = 1234

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Paul Novitski
At 12/1/2006 10:17 AM, Scott wrote: For a project of mine, I need to keep the connection information to a MySQL server database on another server. I'm sure there are more efficient ways to do this, but here's a fall-back: Write a PHP program (web service) to run on the server where the

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread clive
cajbecu wrote: i suggest you: database.conf (the file on another server) host=localhost user=test pass=test anothervar=anothervalue have you thought of the security implications of this, a text file with user names/passwords, thats rather insecure I would say, on your script: $temp =

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread clive
Scott wrote: Hi all, I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. ?php include http://www.remoteserver.com/remote_file.php;; // Use variables $user and $pass

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Richard Lynch
On Fri, December 1, 2006 12:17 pm, Scott wrote: I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. Example remote file: ?php $user = joe; $pass = 1234; ?