I'm a bit lost at the moment and I hope that you can help!
I try to recognize people with OpenCV in Python. This is working so far. With the id of the recognized person I want to display information which belong to her or him.
For that I tried something like this:
1)
import webbrowser
webbrowser.open('http://mysite/index.php?userID=XYZ', new = 0)
But although I wrote the "new = 0" it opens a new browser tab everytime an other userID stands in the link.
2) An other approach was to send information via a http post request to the website like:
url = 'http://mysite/index.php'
query = {'personID': XYZ}
res = requests.post(url, data=query)
But doing this I don't have any idea how to work with this post command in my PHP code so it refreshes the site with the data belonging to user XYZ..
May you help me please?
Kind regards
Edit1 - START: A small php example with using GET parameters would be something like this
<?php
echo("<html><head><title></title></head><body>");
if ($_GET['userID'] == 1) {
echo("<div id='userContent'>Hello User 1</div>");
}
else if ($_GET['userID'] == 2) {
echo("<div id='userContent'>Hello User 2</div>");
}
else {
echo("<div id='userContent'>Public, non user specific information</div>");
}
echo("</body></html>");
?>
But at this point I don't know how to make this site to a dynamic one which shows different information when Python sends a request..
Edit1 - END