Some experiments with web applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
726 B

  1. #!/usr/bin/python
  2. # -*- coding: iso-8859-1 -*-
  3. import cgi
  4. import urllib
  5. import urllib2
  6. # get cgi object
  7. form = cgi.FieldStorage()
  8. ort = ""
  9. hst = ""
  10. vz = ""
  11. vm = ""
  12. timestamp = ""
  13. # check for queries
  14. if (form.getvalue('ort')):
  15. ort = form.getvalue('ort')
  16. if (form.getvalue('hst')):
  17. hst = form.getvalue('hst')
  18. if (form.getvalue('vz')):
  19. vz = form.getvalue('vz')
  20. if (form.getvalue('vz')):
  21. vm = form.getvalue('vz')
  22. if (form.getvalue('timestamp')):
  23. timestamp = form.getvalue('timestamp')
  24. url = "http://widgets.vvo-online.de/abfahrtsmonitor/Abfahrten.do?ort="+ort+"&hst="+hst+"&vz="+vz+"&vm="+vm+"&timestamp="+timestamp
  25. data = urllib2.urlopen(url).read()
  26. print("Content-type: text/html\n\n")
  27. print(data)