QUOTE(Echilon @ 6 Jun, 2008 - 11:48 AM)

I have a program written in C#, and a file in PHP. I need to be able to load information from the PHP file to use in my application. As it happens, the information will contain the database connection details which the PHP script has access to.
I know I could just echo these in PHP, then read them using C#, but I need a more secure method really to prevent anyone from just loading the PHP script in a browser and reading the database credentials.
I'm not an expert in encryption, but I'm fairly confident in both languages. I'm just not sure how to encrypt something with a key in one language, then decrypt it with another. Can anyone point me in the right direction?
You could write a script that analyzes the database in PHP and outputs the resulting database calls to XML. Your C# program could then just read the XML file. After it's finished reading, it could just destroy the file.
I don't know if that's what you're looking for, but it's an option. I wrote a tutorial in the PHP Tutorial section about how to get your database to be XML. Check it out if you're interested.