# HTTP integration

**URL:** <https://www.thethingsnetwork.org/forum/t/http-integration/5271>\
**Category:** Uncategorized\
**Created:** [February 7, 2017, 10:17am UTC](https://www.thethingsnetwork.org/forum/t/http-integration/5271 "2017-02-07T10:17:49Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [August 24, 2018, 7:41am UTC](https://www.thethingsnetwork.org/forum/t/http-integration/5271/45 "2018-08-24T07:41:04Z")

</div>

> [@Ranch-Track](#):
>
> ```php
> echo $decoded; // Can I simply echo the decoded?
> 
> ```

Where do you expect the output to go to? The HTTP integration is a server-to-server interface; when TTN connects to your server, it’s not going to handle the response you’re sending using the line above. Rather than `echo`-ing the request back to TTN, you’ll need to store it somewhere.

> [@Ranch-Track](#):
>
> I go to the website URL directly ([http://websitename.com/file.php](http://websitename.com/file.php)) and then simulate an uplink in TTN console.

It doesn’t make sense that you’re going to that URL: even when TTN _also_ goes to that URL at exactly the very same time (unlikely), there’s nothing in your code to make you (the human) show whatever TTN sent to that URL. Each request is a standalone request; nothing is shared with others who happen to know the same URL.

As a bare minimum without any security, this example from [Parsing HTTP integration data in PHP](https://www.thethingsnetwork.org/forum/t/parsing-http-integration-data-in-php/16928) might help:

> [@Parsing HTTP integration data in PHP](https://www.thethingsnetwork.org/forum/t/parsing-http-integration-data-in-php/16928/2):
>
> When I started using TTN, I used this small PHP script to log raw (i.e., JSON) data from nodes:
> 
> ```auto
> <?php 
> //Receive from TTN
> $postdata = file_get_contents('php://input');
> file_put_contents('yourfile.txt', $postdata . PHP_EOL, FILE_APPEND);
> echo 'ok';
> ?>
> 
> ```
> 
> Then I have another script that reads and decodes each line of such file, showing data on an HTML table. This includes something like:
> 
> …

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/http-integration/5271)._
