Giter Club home page Giter Club logo

tgaas's Introduction

TGaaS

TGaaS is a new software technology which applies the modern concept of a RESTful API by providing a count of the times you've been caught falling for The Game (just like this sentence did). The returned data can be used for the first time to provide a way to keep track through the lifetime of the PHP session on how much times you fell for it.

Features

  • Full SSL support
  • No UTF-8 encoding required
  • MIME-compliant types

Installation

  • Install composer for PHP.
  • Execute composer install on the root of the project.

Usage

Download the source code and unpack it to any public directory of your server. It doesn't matter which one you choose, relative paths are fully supported!

Once you're done, just point your frontend to your server's URL, it would be something like this: http://localhost

The response body should look like this:

{
    "session_id": "46ca16a1544fcbb79f3f976a68b57385",
    "count": 8,
    "status": 200
}

On your frontend, you can keep track of the value returned in session_id and pass it as a header on your calls.

This information should be passed inside of the Set-Cookie header and, at the same time, inside of an internal value called PHPSESSID. Here's an example:

$.ajax({
    url: 'http://localhost',
    headers: { 'Set-Cookie' : 'PHPSESSID=46ca16a1544fcbb79f3f976a68b57385' }
    ...
});

License

This project is licensed under The Unlicense.

tgaas's People

Contributors

facum avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.