RE: Remote MySQL connection via PHP file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That seems like it wouldn't be very secure at all.  Maybe it's just
because I don't understand the reason for *having* to do it that way.
My first suggestion would be to see if there's any way you don't have to
do that.  If you have to do it, I would suggest maybe having it on an
NFS share, or maybe FTP.  Something that requires authentication would
be best.

--
Ray Hauge
Application Development Lead
American Student Loan Services
www.americanstudentloan.com

-----Original Message-----
From: Scott [mailto:svinkle@xxxxxxxxx] 
Sent: Friday, December 01, 2006 12:18 PM
To: php-general@xxxxxxxxxxxxx
Subject:  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";
?>

Example local file:

<?php
include "http://www.remoteserver.com/remote_file.php";;
// Use variables $user and $pass somehow...
?>

I've tried including the file which has the username/pass, etc 
information via HTTP, but this doesn't seem to work. I assume because it

returns what a web browser would return if this file was loaded into 
one, a blank screen.

I've tried using the return statement in the file which houses the 
information, but this seems to return a boolean value (1 or 0)... not 
sure what's up with that.

Any help with this would be most appreciated.

Thank you.

Scott

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux