Skip to content

Instantly share code, notes, and snippets.

@EnriqueV
Created October 31, 2017 00:36
Show Gist options
  • Save EnriqueV/b49d17f7d986fca305fb97f951dd9f0b to your computer and use it in GitHub Desktop.
Save EnriqueV/b49d17f7d986fca305fb97f951dd9f0b to your computer and use it in GitHub Desktop.
usalo asi en php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods:GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, x-xsrf-token');
$device=json_decode(file_get_contents('php://input')); //adquiere los datos que vienen como json
$dato1=$device->dato1queviene;
$dato2=$device->dato2queviene;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment