I'm making an application to login into the phpBB3 forum on my website. I've allready made the password-hash etc. but now I want to setup the connection, I don't want to make use of MySQL external connections, since it's unsafe and I want to spread this program for all the forum users. Which class, script or header do I need to use to setup a connection between the program and login_client.php (which lets the php connect to the database)?
It only has to send username & pass and login_client.php has to return session_id etc. but I only want to know how to establish the connection.
PHP is a server side scripting language. If your MySQL server is the same PC as your web/PHP server, then no external connections get made. Even if the MySQL server is a separate server, the only sql connection is between the two servers. The client does not connect to the MySQL server.
login_client.php should prompt the user for username/password via a form, then when that info is submitted, it connects to MySQL, validates username/password, generates session_id, and passes that back to the client. All that activity will happen on the server, NOT on the client. The only thing the client ever sees is the HTML that is generated by the PHP script.
I think you misunderstood my question. I know how to let PHP communicate with the MySQL etc. but I want to exchange information between the server (MySQL database, login_client.php) and the program. I want to setup a connection between the program and the webserver. How am I supposed to do that?