# How to fetch website login data into node red?

**URL:** <https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323>\
**Category:** General\
**Created:** [25 March 2022 03:42 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323 "2022-03-25T03:42:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnknownForever](https://avatars.discourse-cdn.com/v4/letter/u/6f9a4e/32.png) [@UnknownForever](https://discourse.nodered.org/u/UnknownForever)\
**Post date:** [25 March 2022 03:42 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323/1 "2022-03-25T03:42:21Z")

</div>

Hi guys,  
I have been creating a website using php as back end and mysql as my database. Now I want to display which user is login to the system at node red. Is there any way to fetch the data from website to node red?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 March 2022 07:47 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323/2 "2022-03-25T07:47:03Z")

</div>

You could allow remote access to your database and query it directly.  
Or  
You could query a php script with a http request similar to this post [MQTT data to a mySQL to display data on public website - #12 by astrojav](https://discourse.nodered.org/t/mqtt-data-to-a-mysql-to-display-data-on-public-website/60082/12) Except using a select query and returning the data in the http response.

---

<div class="post-metadata">

**Author:** ![UnknownForever](https://avatars.discourse-cdn.com/v4/letter/u/6f9a4e/32.png) [@UnknownForever](https://discourse.nodered.org/u/UnknownForever)\
**Post date:** [28 March 2022 04:22 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323/3 "2022-03-28T04:22:49Z")

</div>

Actually I'm trying web scraping the php webpage.

```auto
[
    {
        "id": "3f63704b70cdd6cb",
        "type": "html",
        "z": "e126ae3a7d294319",
        "name": "",
        "property": "payload",
        "outproperty": "payload",
        "tag": "table.table>tbody>tr>td",
        "ret": "html",
        "as": "single",
        "x": 590,
        "y": 200,
        "wires": [
            [
                "9ec76d33b583479e"
            ]
        ]
    }
]

```

This my flow and I'm getting empty array not sure why.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f802d5de065f20c75a0c30c7e7217bdc77166779.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 March 2022 06:58 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323/4 "2022-03-28T06:58:17Z")

</div>

Probably because the data in that table is populated by script that is probably fetched from another endpoint AFTER the HTML is loaded.

In your browser's developer tools, select the network tab & refresh the page. You should see all of the requests made. One of them will contain this data. Get that URL & use it in HTTP request node instead of trying to scrape the page.

---

<div class="post-metadata">

**Author:** ![UnknownForever](https://avatars.discourse-cdn.com/v4/letter/u/6f9a4e/32.png) [@UnknownForever](https://discourse.nodered.org/u/UnknownForever)\
**Post date:** [28 March 2022 07:12 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323/5 "2022-03-28T07:12:54Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 April 2022 07:13 UTC](https://discourse.nodered.org/t/how-to-fetch-website-login-data-into-node-red/60323/6 "2022-04-11T07:13:39Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
