Getting request's source site
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Mon Aug 26 10:25:49 EDT 2013
On Mon, 26 Aug 2013 06:10:41 -0700, Guy Tamir wrote:
> Hi all,
>
> I was wondering how i can get the source from which the request came
> from. If a user posted a link that directs to my server on facebook i'd
> like to know that a specific click was from facebook or twitter etc..
That would be the "referer" header in the HTTP request. (Note that it is
an accidental misspelling of "referrer".) Including a referrer is not
compulsory, so be prepared for it not to be available.
--
Steven
More information about the Python-list
mailing list