a dynamic api php, mysql with output json (for small project) Give you many services to manage your database (select , search , add , update , remove )
link api with your database
$Config_DB_Host="localhost"; // Database Host
$Config_DB_Name="test"; // Database name
$Config_DB_User="root"; // Database user name
$Config_DB_Password="root"; // Database user password
secure your api by Authentication Code
$Config_Required_Auth=FALSE; //is required Authentication
$Config_Auth_Code="any code"; //Authentication Code
you need to send json template to POST request
This command enables you to retrieve all the rows in the table user
{
"action": "all",
"auth": "any code",
"from": "user"
}
retrieve records data from table user
by column id
{
"action": "get",
"auth": "any code",
"from": "user",
"key": "id",
"data": {
"id": "1",
}
}
Search records data from table user
by column name
{
"action": "search",
"auth": "any code",
"from": "user",
"key": "name",
"data": {
"name": "ali",
}
}
add record in table user
with values
{
"action": "add",
"auth": "any code",
"from": "user",
"data": {
"id": "1",
"name": "ali",
"pass": "05980727"
}
}
record record in table user
with a particular column id
{
"action": "edit",
"auth": "any code",
"from": "user",
"key": "id",
"data": {
"id": "1",
"name": "ali",
"pass": "05980727"
}
}
remove record in table user
with a particular column id
{
"action": "delete",
"auth": "any code",
"from": "user",
"key": "id",
"data": {
"id": "1"
}
}
- Email - mohammed alimoor