PHP - Allow_url_fopen
Hello,
Am writing a script that is supposed to connect to a remote database without having the credentials (host, user & password) written in the code itself. There are two ideas I picked up from the net and the first is to enable allow_url_fopen in the remote server's php.ini and then have a file with the database credentials that I can fopen with this script and read from it then connect to the database on that same server. But am afraid this might be a security gap since anyone with that file's address will be able to read from it and connect to the database. Is the allow_url_fopen method really secure? The other means is CURL but I am not sure it will work well with my current structure. Please advise me on the best means to connect to this database. Thanks in advance. Similar TutorialsI need a way a user can upload a file onto my website(it's a shared site, I believe, but I own the domain), I've tried using the cURL library but it seems a bit over my head at the moment. And everything I tried with it would not result in a file being uploaded into any folder. What can I do what I need? I've searched around and never found anything that worked for me. |