web services in php
WEB SERVICES Web services are using not by human beings, it is using from programs, softwares which are developed in different languages. These web services help to communicate between two software's. Mainly these web services are made based on storing data and retrieving data. /* this is the index page(index.php) of the web service */ <?php include './functions.php'; // headers to tell that result is JSON header("Content-Type:application/json"); // process client request via url // then process happpens $a=customers(); // send the result now echo json_encode($a); ?> /* this is the function.php file, which includes in the index.php file */ function customers(){ //attributes to connect to the database $host="127.0.0.1"; $username="root"; $password=""; $db_name="shopdb"; ...