Hi!
Wie rufe ich Daten (IP, Host, Browser-Infos) des Clients, mittels Skript ab?
Das liefert bei mir irgendwie recht skurile 'Werte'
http://starship.python.net/crew/davem/c ... eq=all#2.9
Grüße
za0
CGI, Python und Client-Daten
-
- Python-Forum Veteran
- Beiträge: 2010
- Registriert: Freitag 11. Oktober 2002, 18:00
- Wohnort: Salzburg
- Kontaktdaten:
Hi za0,
filtere halt die Werte aus, die mit HTTP_ anfangen:
Gruß
Dookie
filtere halt die Werte aus, die mit HTTP_ anfangen:
Code: Alles auswählen
#!/usr/local/bin/python
import os
print 'Content-type: text/plain\n\n'
for k,v in [a, b for a, b in os.environ.items() if a.startswith("HTTP_")]:
print k, v
Dookie
[code]#!/usr/bin/env python
import this[/code]
import this[/code]