Log in or register to post comments

How to create the Rest API in PHP

August 23, 2017 - 1:13pm #1

How to Create the Rest API in PHP which is getting and sending the data from Vuforia and PHP

How to create the Rest API in PHP

September 5, 2017 - 5:00am #2

Do you need something like this?

https://github.com/FionNoir/VuforiaClient

My REST API looks like this:

 $verb = $_SERVER['REQUEST_METHOD'];

  if ( $verb == 'GET') {
    // Handle get request

    if (isset($_GET['projectid']) && isset($_GET['method']) ) {

      switch ($_GET['method']) {
        case 'getlogo':
            sendLogoImage();
          break;
        case 'getcalendarmotiv':
            sendCalendarImage();
          break;
        default:
          # code...
          break;
      }
    }
  } elseif ($verb == 'POST') {
    // Handle post request
  } elseif ($verb == 'DELETE') {
    // Handle delete request
  }

 

Log in or register to post comments