PHP Classes

File: example_get.php

Recommend this page to a friend!
  Classes of Juan Chaves   Simple API REST Class PHP   example_get.php   Download  
File: example_get.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple API REST Class PHP
Process REST API server requests
Author: By
Last change: update
Date: 7 years ago
Size: 576 bytes
 

Contents

Class file image Download
<?php
session_start
();
/**
 * this class displays a Simple Api Rest query in json format.
 * @author Juan Chaves, juan.cha63@gmail.com
 * Copyright (C) 2017 Juan Chaves
 * This program is free software; distributed under the artistic license.
 */
//example_get.php?&q=Asus,Iphone
if($_SESSION['loggedin']) {
    include(
'./simple_api_rest_class.php');
   
//Example
   
$query = new SimpleApiRestClass();
   
$query->session_ok = $_SESSION['loggedin'];
   
$query->query = $_REQUEST['q'];
   
$query->allows_services = 'get';
   
$post_query = $query->ReturnLogin();
    include(
'./server.php');
}
?>