PHP Classes

File: server.php

Recommend this page to a friend!
  Classes of jeffrey Afable   Simple REST Server   server.php   Download  
File: server.php
Role: Example script
Content type: text/plain
Description: Sample for the server class
Class: Simple REST Server
Implement REST based Web services
Author: By
Last change: add a line of code
Date: 13 years ago
Size: 469 bytes
 

Contents

Class file image Download
<?php
require("simple_restserver.php");
require(
"Greetings.php");

           
$users[] = array("user1","pass1"); # < SAMPLE USERS AND PASSWORDS <-OPTIONAL
           
$users[] = array("user2","pass2"); # < SAMPLE USERS AND PASSWORDS <-OPTIONAL
           
$RestServer =new RestServer();
           
$RestServer->
               
SetAuth($users)-> # SETS THE SERVICE AUTHENTCATIONS <-OPTIONAL
                   
SetClass('Greetings')-> # SETS THE YOUR CLASS
                       
ClassResponse(); # METHOD FOR THE SERVICE RESPONSE
?>