I have problem when I need to get data from browser console. The data is from map tracking online. And the data in browser console is always update every 10 seconds. What I need to ask is, how we get data in browser console and show it in our php code project. Here is the example : .data in browser console of Mozilla Firefox
Asked
Active
Viewed 163 times
-1
-
1You can make an AJAX call to a php page, passing that data as parameters. You can then do what you need with it in PHP. Look up XmlHttpRequest – Reinstate Monica Cellio Nov 20 '17 at 09:57
-
how to pass data as parameters? – Firman Santosa Nov 20 '17 at 10:17
-
Did you even think about looking up XmlHttpRequest? – Reinstate Monica Cellio Nov 20 '17 at 10:18
-
I just look for what u suggest... but its not what I need. I just want to get the log data and make it become variable in my php project realtime. – Firman Santosa Nov 20 '17 at 10:58
-
1y0hami has told you how to capture console logs that are created by other applications, and I've told you what you need to send things to your server. These are the only 2 pieces of information you need. Come back and post some code when you've tried - we're not here to write code at your request. – Reinstate Monica Cellio Nov 20 '17 at 11:04
1 Answers
0
The only way you can achieve this is by modifying the console.log
function in JavaScript so that you can have a store of the logs in the console (take a look at this question) and then use AJAX to pass it to your PHP script.

Sean
- 1,444
- 1
- 11
- 21
-
take a look at the link to the SO question (in my answer), it shows you how to edit the `console.log` function so you can make your own store of logs. – Sean Nov 20 '17 at 10:57