Answer the question
In order to leave comments, you need to log in
Are there any libraries to access MySQL server via PHP bridge?
I would like to write a client-side application that works with data located in a MySQL database on shared PHP hosting and at the same time does not bother with writing a web service in PHP, but directly accesses the database with SLQ queries from the client.
Many desktop applications for administering MySQL databases offer a connection via a PHP bridge (upload a PHP file to the hosting, set a URL on the client and connect to it).
Are there any such solutions bundled with the client library?
Interested in answers for .Net, JavaScript, Java.
Answer the question
In order to leave comments, you need to log in
Hmmmmm, but if it's just
<?
$key="key";
if(hash_equals($key,$POST["key"])){
$pdo=new PDO(....);
$res=[];
$res["res"]=$pdo->query($POST["query"]);
$res["err"]=$pdo->errorInfo();
echo json_encode($res);
}
else
echo "gtfo";
?>
If you do not want to bother with the implementation of a web service, here are two options for you. Apparently, both will suit you (since you only need a database, then you don’t have a very complicated business logic and you need the good old CRUD from the server)
Perhaps you should look towards DBMS that provide a REST interface out of the box (or almost)? For example mongodb. There is also mongolab.com and compose.io
and there is parse.com
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question