PHP Classes

File: views/api/stations.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Scopr   views/api/stations.php   Download  
File: views/api/stations.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Scopr
Crawl and search Web site pages, images and news
Author: By
Last change:
Date: 11 months ago
Size: 511 bytes
 

Contents

Class file image Download
<?php
// var_dump("Im here"); die;
require "controllers/StationController.php";
require_once
"controllers/helpers/Headers.php";
$send = new StationController();
$cross = new Headers();
if (
$_SERVER['REQUEST_METHOD'] === 'GET') {
   
// The request is using the POST method
   
foreach($cross->cross_origin() as $key => $value){
        echo
$value;
    }
   
    echo
$send->allStations($_REQUEST);
}else{
   
header("Content-type: application/json");
    echo
json_encode(["error"=>"Invalid request type"]);
}