[Tutor] Python
Alan Gauld
alan.gauld at freenet.co.uk
Mon Nov 29 19:07:21 CET 2004
> Hi. Is there a way to get a user's URL with Python scripting?
Example: A
> user logs onto your sight and want a script to automatically write
their URL
> or domain to a file. I already know about the writing to file, I
just don't
> know any python function or method that will get a user's URL or
domain. Can
> you help me.
I think you need to be a bit more precise about your terms.
I think you mean:
You want to run a script on your web server which, when a user
visits the site, will extract the visitors <XXXX> and write it
to a file.
Now what's not clear is what exactly you mean by XXXX.
- The user doesn't have a URL, they have an IP address.
- The user may or may not have a domain (but their ISP will)
- The user may be coming from another site which will have
both URL and domain and those are available within the CGI
environment variables.
CAn you clarify what you mean? Writing clear and unambiguous
requirements is one of the key skills of a software engineer!
:-)
Alan G.
More information about the Tutor
mailing list