I have a php file on server that prints some data from the mysql database in json format.
When I run my php file in my browser I can see the json array. Now I want to get that json array in a python file. Is there a way to do it?
here is the code i am using
import subprocess
import json
import codecs
proc = subprocess.Popen("http://www.rpi-connect.esy.es/getappliances?room=1", shell=True, stdout=subprocess.PIPE)
script_response = str(proc.stdout.read().decode('utf8'))
print(script_response)