Accessing another domains central info..
Posted: Sat Mar 11, 2006 4:39 pm
I would like to be able to access the information, like username and password, on domain name A via a php script on domain B
For example :
I have a vars.php on my domain name A
I launch/access a php program on domain B or domain C or domain D or domain E or ..... which will read the variables in the vars.php file of domain name A..
How do I do that correctly ? Can anyone help me with this code ? I am a beginner
In vars.php I have :
$db_username = "test";
$db_password = "test";
So I need a php script read_info.php that will read this from domain A, after that I can use this to log in a user/password protected dir or the mysql database of domain A !
Why do I want to do this ? So I need to change on ONE place username and password, so automatically ALL the other domains (5 or 10 domains) can access it and have access to the CENTRAL database which is on domain A !
Of course nobody will ever know which name I will choose for this php file ! Nor anyone will know which name of variables I will choose !
For example :
I have a vars.php on my domain name A
I launch/access a php program on domain B or domain C or domain D or domain E or ..... which will read the variables in the vars.php file of domain name A..
How do I do that correctly ? Can anyone help me with this code ? I am a beginner
In vars.php I have :
$db_username = "test";
$db_password = "test";
So I need a php script read_info.php that will read this from domain A, after that I can use this to log in a user/password protected dir or the mysql database of domain A !
Why do I want to do this ? So I need to change on ONE place username and password, so automatically ALL the other domains (5 or 10 domains) can access it and have access to the CENTRAL database which is on domain A !
Of course nobody will ever know which name I will choose for this php file ! Nor anyone will know which name of variables I will choose !