christocracy / cordova-plugin-background-geolocation

Sophisticated, battery-conscious, cross-platform background-geolocation with motion-detection
http://transistorsoft.github.io/cordova-background-geolocation
492 stars 743 forks source link

httpHeaders #255

Closed kent2011981 closed 7 years ago

kent2011981 commented 7 years ago

Your Environment

Plugin version: 2.2.5 Plugin configuration options:
desiredAccuracy: 0, stationaryRadius: 15, distanceFilter: 5, url: 'http://pushmobile.ru/ohranasave/blocation.php', httpHeaders: {'deviceID' : device.uuid, 'status' : 1}, maxLocations: 1000, locationProvider: backgroundGeolocation.provider.ANDROID_ACTIVITY_PROVIDER, interval: 10000, fastestInterval: 100, activitiesInterval: 10000, notificationTitle: 'Сэйв', notificationText: 'Фоновый трекинг включен', notificationIconColor: '#FEDD1E', notificationIconLarge: 'mappointer_large', notificationIconSmall: 'mappointer_small',

Context

Help me, plz! Plugin does not sends to my php server these 'httpHeaders'

There is my php request receiver code:

require_once("config.php"); header('Access-Control-Allow-Origin: *'); $data = file_get_contents('php://input'); mysql_query("INSERT INTO os_test (postdata) VALUES ('$data')");

What comes to the server in the database

screenshot_287

christocracy commented 7 years ago

Showing me a screenshot of your JSON from database is irrelevant evidence of missing http headers.

Why don't you look at the raw HTTP request in your server logs??

christocracy commented 7 years ago

And btw, this repo is deprecated. It moved here