Receiving JSON message with PHP / Gateway

Hi all,

In RuuviStation, I have set my gateway URL to www.mydomain.com/phpreceiver.php

In php-file, there’s code below that should save the json-message to file.
But I only receive an empty file?

----klix-----

<?php $jsonString = file_get_contents("php://input"); $myFile = "testFile.txt"; file_put_contents($myFile,$jsonString); ?>

----klix-----

Hello,

You can use service such as hookbin.com to check that you’re receiving valid data from Ruuvi Station.