Article View: borland.public.cppbuilder.internet.web
Article #908Re: Getting Reffering Url
From: Phil
Date: Sun, 04 Dec 2005 11:19
Date: Sun, 04 Dec 2005 11:19
27 lines
1529 bytes
1529 bytes
Hans Galema <notused@notused.nl> wrote:
>Phil wrote:
>
>> AnsiString wherefrom = Request->Referer;
>>
>> But this too is an empty string.
>
>If Indy does not implement that you can query the environment variable
>yourself.
>
>What I use in a cgi.exe is:
>
> if ( getenv ( "HTTP_REFERER" ) )
> printf ( "HTTP_REFERER: %s<br>\n", getenv ( "HTTP_REFERER" ) );
>
>Of course you could sprintf that to a buffer or use AnsiString().printf().
>
>Please report if this does the job.
>
>Hans.
I used:
AnsiString hans = getenv ("HTTP_REFERER");
and it was empty.
Technical Details
Message-ID:
<4392dec8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<438aa43b$1@newsgroups.borland.com> <438ab2db$1@newsgroups.borland.com> <438dd0cb@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,e5553aefb2304786 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Phil" <nospam@nospam.net> Sender: "Phil" <nospam@nospam.net> Reply-To: "Phil" <nospam@nospam.net> Subject: Re: Getting Reffering Url Newsgroups: borland.public.cppbuilder.internet.web X-User-Info: 71.99.31.251 References: <438aa43b$1@newsgroups.borland.com> <438ab2db$1@newsgroups.borland.com> <438dd0cb@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4392dec8$1@newsgroups.borland.com> Date: 4 Dec 2005 04:19:20 -0700 X-Trace: newsgroups.borland.com 1133698760 207.105.83.66 (4 Dec 2005 04:19:20 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail