phyphox Forums
Send data to server - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1)
+--- Forum: Experiments and Ideas (https://phyphox.org/forums/forumdisplay.php?fid=4)
+--- Thread: Send data to server (/showthread.php?tid=2132)



Send data to server - jonas.persson - 04-24-2025

In a project I am involved in, we plan to let pupils in schools collect data that should be sent to a server. 
Is there an easy way to send this data directly to the server without going through a mail program, or for example, Google Drive?


RE: Send data to server - Jens Noriʇzsɔɥ - 04-24-2025

There is https://phyphox.org/wiki/index.php/Network_Connections and you could see an example of its application at https://phyphox.org/sun/


RE: Send data to server - jonas.persson - 04-24-2025

Thanks, I will look into this. The data files to be sent are quite large something that might be an issue.


RE: Send data to server - Jens Noriʇzsɔɥ - 04-24-2025

Size should not be that much of an issue over HTTP, should it? On the other hand: text/json is not … optimal for transferring numerical data.


RE: Send data to server - jonas.persson - 04-28-2025

Seems to work, I am not used to working with PHP, but I could send and read the data. 
The issue is that the users must be able to find their data on the planned webpage. But I can not find a way to show the uniqueID on the phone for identification of data.


RE: Send data to server - Jens Noriʇzsɔɥ - 05-07-2025

[Sorry, my answer did not get published]

The uniqueID cannot be shown and it would not be a comfortable way to identify data (huge random number that you would not want to enter or compare). We would generate personalised XML files that obtain an ID from your server, perhaps associated to user accounts. Alternatively, you could provide an edit field where users could enter a number.


RE: Send data to server - jonas.persson - 05-07-2025

(05-07-2025, 09:54 AM)Jens Noriʇzsɔɥ Wrote: [Sorry, my answer did not get published]

The uniqueID cannot be shown and it would not be a comfortable way to identify data (huge random number that you would not want to enter or compare). We would generate personalised XML files that obtain an ID from your server, perhaps associated to user accounts. Alternatively, you could provide an edit field where users could enter a number.

The issue is that my collaborators wish that users (pupils) could access their measurements on a webpage and compare them with other measurements. An edit field with a number could be a solution, a good idea, thank you!

I got everything working now, except for some ordering issues with the data on the server. The order in which the data (IDs) is written in the resulting data file seems random.  Some PHP issue, but not critical. Just work on the user interface remains and cleaning the code from ugly hacks. Rolleyes


RE: Send data to server - Jens Noriʇzsɔɥ - 05-07-2025

Sounds good. Congrats.

(I am not sure if I have been clear: you could provide the .phyphox files on that website and dynamically include IDs inside the XML files. You could even include user names, however, only in text rather than input fields.)