import urllib.request
import sys
if len(sys.argv) > 1:
  variables = str(sys.argv[1]) + 'variables'
from variables import *

thisfile = 'GetMD5.php'

# make url
url = server + thisfile + '?auth=' + auth
url = url.replace(' ','%20')

# call url
urldata = urllib.request.urlopen(url).read().decode("utf-8")

# write url contents to stdout
#print(urldata)

# write url contents to file
jsonfile = 'model_MD5.json'
handle = open(jsonfile,'w')
handle.write(urldata)
handle.close()
