Login   Register  
PHP Classes
elePHPant
Icontem

File: server.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2011-07-31 18:15
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
?>