How to use http requests (Get function) to get variable value?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew3360
    New Member
    • May 2023
    • 5

    How to use http requests (Get function) to get variable value?

    Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get the variables values of the webpage and print them in my python terminal. Also the variables values are stored in a database. Would pythons http request run the mysql to update the variables before it retrieves them.


    Thank you,

    Matthew Wright
  • dev7060
    Recognized Expert Contributor
    • Mar 2017
    • 655

    #2
    Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get the variables values of the webpage and print them in my python terminal. Also the variables values are stored in a database. Would pythons http request run the mysql to update the variables before it retrieves them.
    How about an API setup to interact with the database?

    It may need authentication. Why 'http request'? Do you want to access the database directly or through the server-side PHP?

    Comment

    • Matthew3360
      New Member
      • May 2023
      • 5

      #3
      Thank you for your reply. I need to access the databases server side through php as the python app will be public. I can't allow them to have access to any of the database connection details. Thanks, Matthew

      Comment

      Working...