It’s way too much work to create a restful web service.
Why can’t we just create a simple php page which receives requests and simply echos the JSON string.
for example:
<?php
$action = $_POST['action'];
if (action == "users")
{
//get all users from DB and echo a JSON string
}
else if (action = "ads")
{
//get all ads from DB and echo a JSON string
}
//etc ect
?>
This is one part of a restful service. It’s read-only. There’s nothing wrong with this approach if you don’t need to do any writes.